程序/cxtdgl/src/org/util/PageUtil.java
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
package org.util;
public class PageUtil {
private int pageSize;// 每页显示的记录数量
private int totalRecord;// 总记录数
private int currentPage;// 当前页码
// ***********************************************
private int totalPage;// 总页数
private int currentStartRecord;// 当前页开始记录
private int currentEndRecord; // 当前页结束记录
private int start;// 开始记录
private int end;// 结束记录
private int upPage;// 向上翻页页码
private int downPage;// 向下翻页页码
public int getPageSize() {
return pageSize;
}
/**
* 设置每页显示的记录数量
*
* @param pageSize
*/
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
public int getTotalRecord() {
return totalRecord;
}
/**
* 设置总记录数
*/
public void setTotalRecord(int totalRecord) {
this.totalRecord = totalRecord;
// 设置总页数
int _totalPage = 1;
if (getTotalRecord() % getPageSize() == 0) {
// 如果总记录数除以每页显示条数可以整除,商就是总页码
_totalPage = this.getTotalRecord() / this.getPageSize();
} else {
// 如果总记录数除以每页显示条数不能整除,商加1才是总页码
_totalPage = this.getTotalRecord() / this.getPageSize() + 1;
}
if (_totalPage < 1) {
_totalPage = 1;
}
this.setTotalPage(_totalPage);
}
public int getCurrentPage() {
return currentPage;
}
/**
* 设置页码
*/
后面还有 103 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。