using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DataEntity.Page
{
///
/// 分页参数
///
public class Pagination
{
///
/// 每页行数
///
public int PageSize { get; set; } = PaginationDefaultParameter.PageSize;
///
/// 当前页
///
public int Current { get; set; } = PaginationDefaultParameter.Current;
///
/// 排序列
///
public string Sidx { get; set; }
///
/// 排序类型
///
public string Sord { get; set; }
///
/// 总记录数
///
public int Records { get; set; }
///
/// 总页数
///
public int Total
{
get
{
if (Records > 0)
{
return Records % this.PageSize == 0 ? Records / this.PageSize : Records / this.PageSize + 1;
}
else
{
return 0;
}
}
}
///
/// 查询条件Json
///
public string ConditionJson { get; set; }
}
///
/// 分页参数(默认参数)
///
public static class PaginationDefaultParameter
{
///
/// 每页行数
///
public static int PageSize = 15;
///
/// 当前页
///
public static int Current = 1;
}
}