예제 #1
0
 // 上一页
 @Override
 public void prevPage() {
   if (pageView.getCurrentPage() <= 1) {
     this.termQuery(1);
   } else {
     this.termQuery(pageView.getCurrentPage() - 1);
   }
 }
예제 #2
0
 // 下一页
 @Override
 public void nextPage() {
   if (pageView.getCurrentPage() >= pageView.getTotalPage()) {
     this.termQuery((int) pageView.getTotalPage());
   } else {
     this.termQuery(pageView.getCurrentPage() + 1);
   }
 }
예제 #3
0
 // 条件查询
 private void termQuery(int currentPage) {
   TOrder torder = new TOrder();
   torder.setOrderID(orderNum.getText().getText().trim());
   TUser tuser = new TUser();
   tuser.setUserID(userNum.getText().getText().trim());
   torder.setTUser(tuser);
   torder.setOperator(seller.getText().getText().trim());
   torder.setHappenTime(startTime.getDate());
   torder.setEndTime(endTime.getDate());
   tableJsp.getViewport().remove(table);
   tableJsp.getViewport().add(waitComponent);
   try {
     pageView.setCurrentPage(currentPage);
     PageModel<TOrder> pageModel =
         orderService.getScrollService(pageView.getFirstResult(), pageView.getMaxResult(), torder);
     pageView.setPageModel(pageModel);
     pageView.setPageIndex(
         PageIndex.getPageIndex(
             pageView.getPageCode(), pageView.getCurrentPage(), pageView.getTotalPage()));
     if (pageModel != null) {
       tableJsp.getViewport().remove(waitComponent);
       tableJsp.getViewport().add(table);
       orderOnlineModel.setRowData(pageModel.getResultList());
       table.updateUI();
       pagingComponent.show();
     } else {
       // 没有订单数据
       waitComponent.setText("不存在数据");
     }
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
예제 #4
0
 @Override
 public String getInfo() {
   return "当前第 " + pageView.getCurrentPage() + " 页/共 " + pageView.getTotalPage() + " 页";
 }
예제 #5
0
 // 尾页
 @Override
 public void lastPage() {
   this.termQuery((int) pageView.getTotalPage());
 }