archive_rewards_his_list.jsp
上传用户:jhtang88
上传日期:2014-01-27
资源大小:28528k
文件大小:4k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html; charset=utf-8"%>
  2. <%@ page import = "java.util.*"%>
  3. <%@ page import = "cn.js.fan.web.*"%>
  4. <%@ page import = "cn.js.fan.db.*"%>
  5. <%@ page import = "cn.js.fan.util.*"%>
  6. <%@ page import = "com.redmoon.oa.archive.*"%>
  7. <%@ page import = "com.redmoon.oa.person.*"%>
  8. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  9. <html>
  10. <head>
  11. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  12. <title>奖励列表</title>
  13. <link href="../common.css" rel="stylesheet" type="text/css">
  14. </head>
  15. <body background="" leftmargin="0" topmargin="5" marginwidth="0" marginheight="0">
  16. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  17. <% 
  18.     if (!privilege.isUserPrivValid(request, "archive.his")) {
  19. out.print(StrUtil.Alert_Back(SkinUtil.LoadString(request, "pvg_invalid")));
  20. return;
  21. }
  22. %>
  23. <%@ include file="archive_inc_his_menu_top.jsp"%>
  24. <br>
  25. <table width="494" border="0" align="center" cellpadding="0" cellspacing="0" class="main">
  26.   <tr> 
  27.     <td height="23" valign="middle" class="right-title">奖励信息管理</td>
  28.   </tr>
  29.   <tr> 
  30.     <td valign="top" background="images/tab-b-back.gif">
  31. <%
  32. String sql;
  33. String userRealName = "";
  34. String myname = privilege.getUser(request);
  35. sql = "select id from archive_rewards_his";
  36. String querystr = "";
  37. int pagesize = 10;
  38. Paginator paginator = new Paginator(request);
  39. int curpage = paginator.getCurPage();
  40. UserRewardsHisDb urhd = new UserRewardsHisDb();
  41. ListResult lr = urhd.listResult(sql, curpage, pagesize);
  42. int total = lr.getTotal();
  43. Vector v = lr.getResult();
  44.     Iterator ir = null;
  45. if (v!=null)
  46. ir = v.iterator();
  47. paginator.init(total, pagesize);
  48. // 设置当前页数和总页数
  49. int totalpages = paginator.getTotalPages();
  50. if (totalpages==0)
  51. {
  52. curpage = 1;
  53. totalpages = 1;
  54. }
  55. %>
  56.       <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
  57.         <tr> 
  58.           <td width="47">&nbsp;</td>
  59.           <td align="right" backgroun="images/title1-back.gif">找到符合条件的记录 <b><%=paginator.getTotal() %></b> 条 每页显示 <b><%=paginator.getPageSize() %></b> 条 页次 <b><%=curpage %>/<%=totalpages %></td>
  60.         </tr>
  61.       </table> 
  62.       <table width="97%" border="0" align="center" cellpadding="2" cellspacing="0">
  63.         <tr align="center" bgcolor="#C4DAFF"> 
  64.           <td width="17%">姓名</td>
  65.           <td width="16%" bgcolor="#C4DAFF"><span class="TableContent">何时</span></td>
  66.           <td width="14%" bgcolor="#C4DAFF"><span class="TableContent">何地</span></td>
  67.           <td width="14%" bgcolor="#C4DAFF"><span class="TableContent">何种奖励</span></td>
  68.           <td width="12%"><span class="TableContent">主要事迹</span></td>
  69.           <td width="14%">备注</td>
  70.           <td width="13%">操作</td>
  71.         </tr>
  72.       </table>
  73.       <%
  74.    int i = 0;
  75. UserInfoHisDb uihd = new UserInfoHisDb();
  76. while (ir!=null && ir.hasNext()) {
  77. urhd = (UserRewardsHisDb)ir.next();
  78. i++;
  79. int id = urhd.getId();
  80. userRealName = uihd.getUserRealName(urhd.getUserName());
  81. String myDate = DateUtil.format(urhd.getMyDate(), "yyyy-MM-dd");
  82.  %>
  83.       <table width="97%" border="0" align="center" cellpadding="2" cellspacing="0">
  84.         <tr align="center"> 
  85.           <td width="17%"><%=userRealName%></td>
  86.           <td width="16%"><%=myDate%></td>
  87.           <td width="14%"><%=urhd.getPlace()%> </td>
  88.           <td width="14%"><%=urhd.getRewards()%></td>
  89.           <td width="12%"><%=urhd.getReason()%></td>
  90.           <td width="14%"><%=urhd.getRemark()%></td>
  91.           <td width="13%"><a href="archive_rewards_his_show.jsp?id=<%=urhd.getId()%>">查看</a></td>
  92.         </tr>
  93.       </table>
  94.        <%}%>
  95.       <br>
  96.       <table width="98%" border="0" cellspacing="1" cellpadding="3" align="center" class="9black">
  97.         <tr> 
  98.           <td width="1%" height="23">&nbsp;</td>
  99.           <td height="23" valign="baseline"> 
  100.             <div align="right"> 
  101.             <%
  102. out.print(paginator.getCurPageBlock("?"+querystr));
  103. %>
  104.               &nbsp;</div></td>
  105.         </tr>
  106.       </table>
  107.     </td>
  108.   </tr>
  109.   <tr> 
  110.     <td height="30" colspan="2" align="center">
  111.     </td>
  112.   </tr>
  113. </table>
  114. </body>
  115. </html>