C#

C# 手动分页

2022-07-11  本文已影响0人  Rinaloving
   public dynamic  GetGoodsPageList(dynamic data, ref int recordCount, ref int totalPage)
   {

            recordCount = list.Count();   // list 为结果集合
            if (recordCount % pageSize == 0)
            {
                totalPage = recordCount / pageSize;
            }
            else
            {
                totalPage = (recordCount / pageSize) + 1;
            }
            return resOrderList.Skip(pageSize * (pageNum - 1)).Take(pageSize).ToList();
 }
上一篇下一篇

猜你喜欢

热点阅读