Files
HTCloud/HT.Cloud.Code/Web/Pagination.cs
2023-03-03 16:07:50 +08:00

58 lines
1.1 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*******************************************************************************
* Copyright © 2016 HT.Cloud.Framework 版权所有
* Author: HT.Cloud
* Description: WaterCloud快速开发平台
* Website
*********************************************************************************/
namespace HT.Cloud.Code
{
/// <summary>
/// 分页信息
/// </summary>
public class Pagination
{
/// <summary>
/// 每页行数
/// </summary>
public int rows { get; set; }
/// <summary>
/// 当前页
/// </summary>
public int page { get; set; }
/// <summary>
/// 排序列
/// </summary>
public string field { get; set; }
/// <summary>
/// 排序类型
/// </summary>
public string order { get; set; }
/// <summary>
/// 总记录数
/// </summary>
public int records { get; set; }
/// <summary>
/// 总页数
/// </summary>
public int total
{
get
{
if (records > 0)
{
return records % this.rows == 0 ? records / this.rows : records / this.rows + 1;
}
else
{
return 0;
}
}
}
}
}