Exemplo n.º 1
0
        /// <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);
        }
Exemplo n.º 2
0
 public BusinessCountManageList(List<BusinessViewModel> _businessModel, PagingResult pagingResult)
 {
     businessModel = _businessModel;
     PagingResult = pagingResult;
 }