archive_query_showfieldcode_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=modifyShowFieldCode">
  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[] tableCodeArr = null;
  33. String showFieldCodeStr = aqd.getShowFieldCode();
  34. String[] showFieldCodeArr = showFieldCodeStr.split(",");
  35. int i = 0;
  36.     String sql = "",tableFullCode = "",tableCodeStr = "",fieldCode = "";
  37. TableInfoDb tid = new TableInfoDb();
  38. TableFieldInfoDb tfid = new TableFieldInfoDb();
  39. while(i < tableFullCodeArr.length){
  40.    tableCodeArr = tableFullCodeArr[i].split(" ");
  41.    tid = tid.getTableInfoDb(tableCodeArr[0]);
  42. %>
  43.       <table class="tableframe" cellSpacing="1" cellPadding="2" width="95%" align="center" border="0" bgcolor="#FFFFFF">
  44.         <tbody>
  45.           <tr>
  46.             <td colspan="3" class="right-title"><%=tid.getTableDescription()%></td>
  47.           </tr>
  48. <%
  49.    sql = ArchiveSQLBuilder.getArchiveTableField(tid.getTableShortCode());  
  50.    
  51.    Vector vt = tfid.list(sql);
  52.    Iterator ir = null;
  53.    ir = vt.iterator();
  54.    while (ir!=null && ir.hasNext()) {
  55.    tfid = (TableFieldInfoDb)ir.next();
  56.    fieldCode =  tfid.getTableShortCode() + "." + tfid.getFieldCode();  
  57.    int j = 0;
  58. %>
  59.           <tr>
  60.             <td noWrap width="109"><%=tfid.getFieldName()%></td>
  61.             <td noWrap><input type="checkbox" name="fieldCode" value="<%=fieldCode%>" 
  62. <%while(j < showFieldCodeArr.length){
  63.    if(showFieldCodeArr[j].equals(fieldCode)){
  64. %> 
  65.       checked 
  66.     <%
  67.    }
  68.    j++;
  69.      }
  70. %>
  71. >选择该字段显示
  72. </td>
  73.           </tr>
  74. <%
  75.        }
  76. %>
  77.         </tbody>
  78.       </table>
  79. <%   
  80.    i++;
  81. }
  82. %>
  83.       </td>
  84.     </tr>  
  85.     <tr>
  86.       <td align="center"><input value="保存显示字段" type="submit">&nbsp;&nbsp;
  87.         <input type="hidden" name="id" value="<%=id%>">
  88.       </td>
  89.     </tr>
  90.   </table>
  91. </form>
  92. </body>
  93. </html>