首页 > 编程语言 > 详细

分页算法

时间:2019-03-29 12:37:20      阅读:104      评论:0      收藏:0      [点我收藏+]

方法一

//总页数=(总记录数+每页行数-1)/每页行数
intPageCount = (intRowCount+intPageSize-1) / intPageSize;

 

方法二

//总记录数与每页显示记录数求余运算,计算总页数

setTotalpage(this.totalrecord % this.maxresult == 0 ? this.totalrecord / this.maxresult : this.totalrecord / this.maxresult + 1);

分页算法

原文:https://www.cnblogs.com/tc310/p/10620229.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!