PagesModel.cs 763 B

1234567891011121314151617181920212223
  1. using System.Collections.Generic;
  2. namespace Ropin.Inspection.Model
  3. {
  4. public class PagesModel<T>
  5. {
  6. public PagesModel(IEnumerable<T> items, BaseSearchModel searchModel)
  7. {
  8. IsPagination = searchModel.IsPagination;
  9. PageIndex = searchModel.PageIndex;
  10. PageSize = searchModel.PageSize;
  11. RecordCount = searchModel.TotalCount;
  12. Items = items;
  13. }
  14. public bool IsPagination { get; set; } = true; //是否分页
  15. public int PageIndex { get; set; } = 1; //页码
  16. public int PageSize { get; set; } = 10; //每页10行
  17. public int RecordCount { get; set; } = 0; //总行数
  18. public IEnumerable<T> Items { get; set; }
  19. }
  20. }