function f_showPage() {
var pageHtml = ‘‘;
if (currentGroup > 0) {
pageHtml = pageHtml
+ "<a href=‘javascript:gridMainPreGroup()‘><<</a> ";
}
else
{
pageHtml = pageHtml
+ "<a><<</a> ";
}
if (currentPage > 1) {
pageHtml = pageHtml
+ "<a href=‘javascript:gridMainPrePage()‘><</a>"
}
else
{
pageHtml = pageHtml
+ "<a><</a> ";
}
var pageNum = currentGroup * 9 + 1;
for ( var i = 0; i < 9; i++) {
if (pageNum == currentPage) {
pageHtml = pageHtml
+ "<a class=\"current\" href=‘javascript:gridMainChangePage("
+ pageNum + ")‘>" + pageNum + "</a>"
} else {
pageHtml = pageHtml
+ "<a href=‘javascript:gridMainChangePage("
+ pageNum + ")‘>" + pageNum + "</a>"
}
pageNum++;
}
pageHtml = pageHtml
+ "<a href=‘javascript:gridMainNextPage()‘>></a>"
pageHtml = pageHtml
+ "<a href=‘javascript:gridMainNextGroup()‘>>></a>"
$("#page").html(pageHtml);
}
function f_showBadPage() {
var pageHtml = ‘‘;
pageHtml = pageHtml
+ "<a><<</a> ";
pageHtml = pageHtml
+ "<a><</a> ";
var pageNum = currentGroup * 9 + 1;
for ( var i = 0; i < 9; i++) {
if (pageNum == currentPage) {
pageHtml = pageHtml
+ "<a class=\"current\">" + pageNum + "</a>"
} else {
pageHtml = pageHtml
+ "<a>" + pageNum + "</a>"
}
pageNum++;
}
pageHtml = pageHtml
+ "<a>></a>"
pageHtml = pageHtml
+ "<a>>></a>"
$("#page").html(pageHtml);
}
function gridMainPreGroup() {
if(currentGroup > 0)
{
lastGroup = currentGroup;
lastPage = currentPage;
currentGroup = currentGroup - 1;
currentPage = currentGroup * 9 + 1;
}
f_showBadPage();
var parms = gridMain.get(‘parms‘);
parms.page = currentPage;
parms.pagesize = 30;
gridMain.set(‘parms‘, parms);
gridMain.loadData();
}
function gridMainPrePage() {
lastGroup = currentGroup;
lastPage = currentPage;
currentPage = currentPage - 1;
if (currentPage < currentGroup * 9 + 1) {
if (currentGroup > 0) {
currentGroup = currentGroup - 1;
}
}
f_showBadPage();
var parms = gridMain.get(‘parms‘);
parms.page = currentPage;
parms.pagesize = 30;
gridMain.set(‘parms‘, parms);
gridMain.loadData();
}
function gridMainChangePage(page) {
lastGroup = currentGroup;
lastPage = currentPage;
currentPage = page;
f_showBadPage();
var parms = gridMain.get(‘parms‘);
parms.page = currentPage;
parms.pagesize = 30;
gridMain.set(‘parms‘, parms);
gridMain.loadData();
}
function gridMainNextGroup() {
lastGroup = currentGroup;
lastPage = currentPage;
currentGroup = currentGroup + 1;
currentPage = currentGroup * 9 + 1;
f_showBadPage();
var parms = gridMain.get(‘parms‘);
parms.page = currentPage;
parms.pagesize = 30;
gridMain.set(‘parms‘, parms);
gridMain.loadData();
}
function gridMainNextPage() {
lastGroup = currentGroup;
lastPage = currentPage;
currentPage = currentPage + 1;
if (currentPage > currentGroup * 9 + 9) {
currentGroup = currentGroup + 1;
}
f_showBadPage();
var parms = gridMain.get(‘parms‘);
parms.page = currentPage;
parms.pagesize = 30;
gridMain.set(‘parms‘, parms);
gridMain.loadData();
}