纽威
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.1 KiB

3 years ago
  1. namespace NFine.Code
  2. {
  3. /// <summary>
  4. /// 分页信息
  5. /// </summary>
  6. public class Pagination
  7. {
  8. /// <summary>
  9. /// 每页行数
  10. /// </summary>
  11. public int rows { get; set; }
  12. /// <summary>
  13. /// 当前页
  14. /// </summary>
  15. public int page { get; set; }
  16. /// <summary>
  17. /// 排序列
  18. /// </summary>
  19. public string sidx { get; set; }
  20. /// <summary>
  21. /// 排序类型
  22. /// </summary>
  23. public string sord { get; set; }
  24. /// <summary>
  25. /// 总记录数
  26. /// </summary>
  27. public int records { get; set; }
  28. /// <summary>
  29. /// 总页数
  30. /// </summary>
  31. public int total
  32. {
  33. get
  34. {
  35. if (records > 0)
  36. {
  37. return records % this.rows == 0 ? records / this.rows : records / this.rows + 1;
  38. }
  39. else
  40. {
  41. return 0;
  42. }
  43. }
  44. }
  45. }
  46. }