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

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html; charset=utf-8"%>
  2. <%@ page import = "java.util.*"%>
  3. <%@ page import = "cn.js.fan.db.*"%>
  4. <%@ page import = "cn.js.fan.web.*"%>
  5. <%@ page import = "cn.js.fan.util.*"%>
  6. <%@ page import = "com.redmoon.oa.meeting.*"%>
  7. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  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. <%@ include file="../inc/nocache.jsp"%>
  15. <style type="text/css">
  16. <!--
  17. .STYLE2 {color: #0033FF}
  18. .STYLE3 {color: #FF0000}
  19. -->
  20. </style>
  21. </head>
  22. <body background="" leftmargin="0" topmargin="5" marginwidth="0" marginheight="0">
  23. <%@ include file="boardroom_inc_apply_top.jsp"%>
  24. <br>
  25. <table border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="main">
  26.   <tr> 
  27.     <td width="840" height="23" valign="middle" class="right-title"><span>&nbsp;会议管理</span></td>
  28.   </tr>
  29.   <tr> 
  30.     <td valign="top" background="images/tab-b-back.gif">
  31. <%
  32. String sql = "";
  33. String result = ParamUtil.get(request, "result");
  34. String querystr = "";
  35. String beginDate = "";
  36. String endDate = "";
  37. if (result.equals(BoardroomSQLBuilder.RESULT_APPLY)) {
  38.     sql = BoardroomSQLBuilder.getBoardroomApplySearchSql();
  39. }else{
  40.     if (result.equals(BoardroomSQLBuilder.RESULT_USED)) {
  41.         sql = BoardroomSQLBuilder.getBoardroomUsedSearchSql();
  42.     }else{
  43.     if (result.equals(BoardroomSQLBuilder.RESULT_DISAGREE)) {
  44.            sql = BoardroomSQLBuilder.getBoardroomDisagreeSearchSql();
  45.         }else{
  46.    if (result.equals(BoardroomSQLBuilder.RESULT_AGREE)) {
  47.               sql = BoardroomSQLBuilder.getBoardroomAgreeSearchSql();
  48.            }else{
  49.                   sql = BoardroomSQLBuilder.getBoardroomEndSearchSql();    
  50.            } 
  51.         } 
  52. }   
  53. }
  54. querystr += "result=" + result;
  55. int pagesize = 10;
  56. Paginator paginator = new Paginator(request);
  57. int curpage = paginator.getCurPage();
  58. BoardroomApplyDb bad = new BoardroomApplyDb();
  59. ListResult lr = bad.listResult(sql, curpage, pagesize);
  60. int total = lr.getTotal();
  61. Vector v = lr.getResult();
  62.     Iterator ir = null;
  63. if (v!=null)
  64. ir = v.iterator();
  65. paginator.init(total, pagesize);
  66. // 设置当前页数和总页数
  67. int totalpages = paginator.getTotalPages();
  68. if (totalpages==0)
  69. {
  70. curpage = 1;
  71. totalpages = 1;
  72. }
  73. %>
  74.       <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
  75.         <tr> 
  76.           <td width="47">&nbsp;</td>
  77.           <td align="right" backgroun="images/title1-back.gif">找到符合条件的记录 <b><%=paginator.getTotal() %></b> 条 每页显示 <b><%=paginator.getPageSize() %></b> 条 页次 <b><%=curpage %>/<%=totalpages %></td>
  78.         </tr>
  79.       </table> 
  80.       <form name="form1" action="vehicle_maintenance_add.jsp" method="post">
  81.     <table width="97%" border="0" align="center" cellpadding="2" cellspacing="0" >
  82.           <tr align="center" bgcolor="#C4DAFF">
  83.             <td width="19%" height="24" >会议名称</td>
  84.             <td width="15%" bgcolor="#C4DAFF" >申请人</td>
  85.             <td width="16%" bgcolor="#C4DAFF" >会议室</td>
  86.             <td width="14%" >开始时间</td>
  87.             <td width="12%" >结束时间</td>
  88.             <td width="24%" >操作</td>
  89.           </tr>
  90.         </table>
  91.     <%
  92.    int i = 0;
  93. while (ir!=null && ir.hasNext()) {
  94. bad = (BoardroomApplyDb)ir.next();
  95. if(bad.getStart_date() == null){
  96.   beginDate = "";
  97. }else{
  98.   beginDate = DateUtil.format(bad.getStart_date(), "yy-MM-dd HH:mm");
  99. }
  100. if(bad.getEnd_date() == null){
  101.   endDate = "";
  102. }else{
  103.   endDate = DateUtil.format(bad.getEnd_date(), "yy-MM-dd HH:mm");
  104. }
  105. %>
  106.       <table width="97%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#B6CFC5" bgcolor="#FFFFFF">
  107.         <tr align="center" >
  108.           <td width="19%" height="22"><%=bad.getMeetingTitle()%></td> 
  109.           <td width="15%"><%=bad.getSqren()%></td>
  110.   <td width="16%">
  111.   <%
  112.   String mroom = bad.getHyshi();
  113.   if (mroom.equals(""))
  114.    mroom = "尚未选定会议室!";
  115.   else {
  116.   BoardroomDb bd = new BoardroomDb();
  117.   bd = bd.getBoardroomDb(Integer.parseInt(mroom));
  118.      mroom = bd.getName();
  119.   }
  120.   %>
  121.   <%=mroom%>
  122.   </td>
  123.   <td width="14%"><%=beginDate%></td>
  124.   <td width="12%"><%=endDate%></td>
  125.   <td><a href="boardroom_apply_show.jsp?flowId=<%=bad.getFlowId()%>">详细信息</a></td>
  126.   </tr>
  127.       </table>
  128.       <%}%>   
  129.   </form>
  130.       <table width="98%" border="0" cellspacing="1" cellpadding="3" align="center">
  131.         <tr> 
  132.           <td width="1%" height="23">&nbsp;</td>
  133.           <td height="23" valign="baseline"> 
  134.             <div align="right">
  135.              <%
  136.    out.print(paginator.getCurPageBlock("?"+querystr));
  137.  %>
  138.             &nbsp;</div></td>
  139.         </tr>
  140.       </table>    </td>
  141.   </tr>
  142. </table>
  143. </body>
  144. </html>