📄 page.cs
字号:
using System;
using System.Collections.Generic;
using System.Text;
using AssetsSystem.Inc;
namespace AssetsSystem.Dao
{
class Page
{
//当前页数
private String page = "1";
//总页数
private String totalpage = "1";
//总记录数
private int total;
//每页记录数目
private String pageSize = "30";
public void setPage(String s)
{
this.page = s;
}
public String getPage()
{
return this.page;
}
public int getPageInInt()
{
return Convert.ToInt32(this.page);
}
public void setTotalPage(String s)
{
this.totalpage = s;
}
public String getTotalPage()
{//返回总页数
return totalpage;
}
public void setTotal(int totalCount)
{
if (totalCount > 0)
{
this.total = totalCount;
int count = totalCount / this.getPageSizeInInt();
if (totalCount % this.getPageSizeInInt() > 0)
count++;
setTotalPage(count.ToString());
}
else
{
this.total = 0;
}
}
public int getTotal()
{//返回总记录
return total;
}
public void setPageSize(String s)
{
this.pageSize = s;
}
public String getPageSize()
{
return this.pageSize;
}
public int getPageSizeInInt()
{
return Convert.ToInt32(this.pageSize);
}
public int getFirstResult()
{
return ((this.getPageInInt() - 1) * this.getPageSizeInInt());
}
public bool isSupport()
{
if (!Util.isnumstr(this.page) || !Util.isnumstr(this.pageSize))
{
return false;
}
return true;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -