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

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html; charset=utf-8"%>
  2. <%@ page import = "java.net.URLEncoder"%>
  3. <%@ page import = "java.util.*"%>
  4. <%@ page import = "cn.js.fan.util.*"%>
  5. <%@ page import = "cn.js.fan.web.*"%>
  6. <%@ page import = "com.redmoon.oa.archive.*"%>
  7. <html xmlns="http://www.w3.org/1999/xhtml">
  8. <head>
  9. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  10. <title>用户档案查询</title>
  11. <link href="../common.css" rel="stylesheet" type="text/css">
  12. </head>
  13. <body>
  14. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  15. <%
  16. if (!privilege.isUserPrivValid(request, "archive.query")) {
  17. out.print(StrUtil.Alert_Back(SkinUtil.LoadString(request, "pvg_invalid")));
  18. return;
  19. }
  20. %>
  21. <br>
  22. <form name="form1" method="post" action="archive_query_do.jsp?op=modifyOrderFieldCode">
  23.   <table width="95%" border="0">
  24.     <tr>
  25.       <td>
  26. <%
  27.     int id = ParamUtil.getInt(request, "id");
  28.     ArchiveQueryDb aqd = new ArchiveQueryDb();
  29.     aqd = aqd.getArchiveQueryDb(id);
  30.     String tableFullCodeStr = aqd.getTableCode();
  31.     String[] tableFullCodeArr = tableFullCodeStr.split(",");
  32.     String orderFieldCodeStr = aqd.getOrderFieldCode();
  33. String[] orderFieldCodeArr = orderFieldCodeStr.split(",");
  34. String[] orderFieldArr = null;
  35. String[] tableCodeArr = null;
  36. String sql = "",fieldCode = "";
  37. int i = 0;
  38. TableInfoDb tid = new TableInfoDb();
  39. TableFieldInfoDb tfid = new TableFieldInfoDb();
  40. ArchiveQueryConditionDb aqcd = new ArchiveQueryConditionDb();
  41. while(i < tableFullCodeArr.length){
  42.    tableCodeArr = tableFullCodeArr[i].split(" ");
  43.    tid = tid.getTableInfoDb(tableCodeArr[0]);    
  44. %>
  45.       <table class="tableframe" cellSpacing="1" cellPadding="2" width="95%" align="center" border="0" bgcolor="#FFFFFF">
  46.         <tbody>
  47.           <tr>
  48.             <td colspan="3" class="right-title"><%=tid.getTableDescription()%></td>
  49.           </tr>
  50. <%
  51.    sql = ArchiveSQLBuilder.getArchiveTableField(tid.getTableShortCode());
  52.       
  53.    tfid = new TableFieldInfoDb();
  54.    Vector vt = tfid.list(sql);
  55.    Iterator ir = null;
  56.    ir = vt.iterator();
  57.    while (ir!=null && ir.hasNext()) {
  58.    tfid = (TableFieldInfoDb)ir.next();
  59.    fieldCode =  tfid.getTableShortCode() + "." + tfid.getFieldCode();
  60.    int j = 0;
  61.    String asc = "",desc = "";
  62.    while(j < orderFieldCodeArr.length){
  63.       if(orderFieldCodeArr[j].equals(fieldCode +" ASC")){
  64.                  asc = "selected";
  65.   }
  66.   if(orderFieldCodeArr[j].equals(fieldCode +" DESC")){
  67.      desc = "selected";
  68.   }
  69.       j++;
  70.    }
  71. %>
  72.           <tr>
  73.             <td noWrap width="109"><%=tfid.getFieldName()%></td>
  74.             <td noWrap>
  75.   <select name="fieldCode">
  76.     <option value=""></option>
  77.     <option value="<%=fieldCode%> ASC" <%if(!asc.equals("")){out.print(asc);}%>>升续</option>
  78.     <option value="<%=fieldCode%> DESC" <%if(!desc.equals("")){out.print(desc);}%>>降续</option>
  79.   </select> 
  80. </td>
  81.           </tr>
  82. <%
  83.        }
  84. %>
  85.         </tbody>
  86.       </table>
  87. <%   
  88.    i++;
  89. }
  90. %>
  91.       </td>
  92.     </tr>  
  93.     <tr>
  94.       <td align="center"><input value="保存排序字段" type="submit">
  95. <input type="hidden" name="id" value="<%=id%>"> 
  96. &nbsp;&nbsp;    </td>
  97.     </tr>
  98.   </table>
  99. </form>
  100. </body>
  101. </html>