コード例 #1
0
ファイル: PagedList.cs プロジェクト: xiaotou745/et-eds-csharp
        /// <summary>
        /// Ctor
        /// </summary>
        /// <param name="source">source</param>
        /// <param name="pageIndex">Page index</param>
        /// <param name="pageSize">Page size</param>
        public PagedList(IList <T> source, int pageIndex, int pageSize)
        {
            PagingResult = new PagingResult(pageIndex, pageSize);

            PagingResult.TotalCount = source.Count();

            var skipCount = pageIndex * pageSize;
            var data      = source.Skip(skipCount).Take(pageSize).ToList();

            PagingResult.RecordCount = data.Count;

            this.AddRange(data);
        }
コード例 #2
0
 public BusinessCountManageList(List<BusinessViewModel> _businessModel, PagingResult pagingResult)
 {
     businessModel = _businessModel;
     PagingResult = pagingResult;
 }