You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
956 B
C#
48 lines
956 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace Common.Entity
|
|
{
|
|
/// <summary>
|
|
///分页页面实体
|
|
/// </summary>
|
|
public class PageEntity
|
|
{
|
|
|
|
|
|
private int _pagesize = 20;
|
|
|
|
private int _page = 1;
|
|
/// <summary>
|
|
/// 当前页
|
|
/// </summary>
|
|
public int Page { get { return _page; }
|
|
set {
|
|
_page = value < 1 ? 1 : value;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// 单页条数
|
|
/// </summary>
|
|
public int Limit
|
|
{
|
|
get { return _pagesize; }
|
|
set
|
|
{ _pagesize=value>100000 ? 100000 : value; }
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// 转换PageEntity
|
|
/// </summary>
|
|
/// <returns>返回Page</returns>
|
|
public PageEntity ToPageEntity()
|
|
{
|
|
return new PageEntity { Page = Page, Limit = Limit };
|
|
}
|
|
|
|
}
|
|
}
|