Using CSLALight
Please correct me if I'm wrong; I added the following 2 methods and a class called DateRange
I am getting a serialization exception.."Add any types not known statically to the list of known types..."
Any help appreciated?
public
static void GetAdditionalExpenseListRange(DateRange dateRange, EventHandler<DataPortalResult<ReadOnlyAdditionalExpenseList>> handler){
DataPortal<ReadOnlyAdditionalExpenseList> dp = new DataPortal<ReadOnlyAdditionalExpenseList>();dp.FetchCompleted += handler;
dp.BeginFetch(
new SingleCriteria<ReadOnlyAdditionalExpense, DateRange>(dateRange));}
AND
private void DataPortal_Fetch(SingleCriteria<ReadOnlyAdditionalExpenseList, DateRange> dateRange)
{
RaiseListChangedEvents = false;
....
CLASS
[
Serializable] public class DateRange{
public DateRange(){
}
public DateRange(DateTime StartDate, DateTime EndDate){
_startDate = StartDate;
_endDate = EndDate;
}
private DateTime _startDate; public DateTime StartDate{
get { return _startDate; } set { _startDate = value; }}
private DateTime _endDate; public DateTime EndDate{
get { return _endDate; } set { _endDate = value; }}
}
Copyright (c) Marimer LLC