A
Ashok Tho
Hi All,
To Populate a ListBox on Pocket PC Mobile Form i am using
a ArrayList which is coming inturn from ObjectCollection.
My question is Is there any better way to receive data,
because i am loading around 1500 records.
Mobile Form Code:-
Note:- Where empList is a return values from
RetrieveEmployeesByCustomer
foreach (Employee emp in empList)
{
.......
}
The below one is the sample code of collection class:-
public ArrayList RetrieveEmployeesByCustomer(string key)
{
return Filter(new GenericFilter
(Filters.FilterByPartialKey.Filter), key,
new Comparers.EmployeesByCustomerNumber());
}
public ArrayList Filter(GenericFilter filterFunc, string
filterParam, IComparer sortFunc)
{
ArrayList gefilteList = new ArrayList();
foreach(Employee emp in List)
{
if(filterFunc(emp, filterParam) == true)
{
gefilteList.Add(emp);
}
}
gefilteList.Sort(sortFunc);
return gefilteList;
}
I need better performance than this. Any idea
To Populate a ListBox on Pocket PC Mobile Form i am using
a ArrayList which is coming inturn from ObjectCollection.
My question is Is there any better way to receive data,
because i am loading around 1500 records.
Mobile Form Code:-
Note:- Where empList is a return values from
RetrieveEmployeesByCustomer
foreach (Employee emp in empList)
{
.......
}
The below one is the sample code of collection class:-
public ArrayList RetrieveEmployeesByCustomer(string key)
{
return Filter(new GenericFilter
(Filters.FilterByPartialKey.Filter), key,
new Comparers.EmployeesByCustomerNumber());
}
public ArrayList Filter(GenericFilter filterFunc, string
filterParam, IComparer sortFunc)
{
ArrayList gefilteList = new ArrayList();
foreach(Employee emp in List)
{
if(filterFunc(emp, filterParam) == true)
{
gefilteList.Add(emp);
}
}
gefilteList.Sort(sortFunc);
return gefilteList;
}
I need better performance than this. Any idea