1[DataObjectMethod( DataObjectMethodType.Select, false )]
2public MyCollection FetchAllPaged(int start, int pageLength)
3{
4 int startIndex;
5
6 if(start <= 1)
7 {
8 startIndex = 1;
9 }
10 else
11 {
12 startIndex = start / pageLength + 1;
13 }
14 Query qry = new Query( My.Schema );
15 qry.PageSize = pageLength;
16 qry.PageIndex = startIndex;
17 return FetchByQuery(qry);
18 }
19public int FetchAllCount()
20{
21 Query qry = new Query( [Schema] );
22 return qry.GetCount( [Columns] );
23}