예제 #1
0
 public PageList(IList <T> list, PagerObject pager)
 {
     this.total = list.Count;
     for (int i = pager.startIndex; (i < this.total) && (i < pager.endIndex); i++)
     {
         this.AddLast(list.ElementAt <T>(i));
     }
 }
예제 #2
0
        public static ICriteria CreateCriteria <T>(PagerObject pager)
        {
            ICriteria icr = CreateCriteria <T>();

            icr.SetFirstResult(pager.startIndex);
            icr.SetMaxResults(pager.size);
            return(icr);
        }