EditAddressKind.jsp
上传用户:mingda
上传日期:2017-06-20
资源大小:27691k
文件大小:5k
源码类别:

OA系统

开发平台:

Java

  1. <%@ page contentType="text/html; charset=gb2312"%>
  2. <%@ page import="com.gforce.gfoa.*,com.gforce.currency.*,java.util.*" %>
  3. <jsp:include page="/CheckLogin.jsp" flush="true"/> <% Session m_session = new Session(session); %>
  4. <%
  5. Request m_request = new Request(request);
  6. Session t_session = new Session(session);
  7. int intAddressKindId = m_request.GetInt("ID");
  8. int intUserId = t_session.GetInt("UserID");
  9. if(intAddressKindId<1)
  10. {
  11. %>
  12. <script language="JavaScript" type="text/JavaScript">
  13. alert("请选择正确的通讯录分类,修改失败!");
  14. history.back();
  15. </script>
  16. <%
  17. }
  18. else
  19. {
  20. Vector vt = AddressKindManager.getAllRecord(intUserId);
  21. %>
  22. <html>
  23. <head>
  24. <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
  25. <title>通讯录分类管理-- GForce OA 2.0</title>
  26. <link href="../css/txt.jsp" rel="stylesheet" type="text/css"><script language="JavaScript" src="/js/changestyle.js"></script>
  27. <script language="JavaScript" type="text/javascript">
  28. function checkeditaddresskind()
  29. {
  30.     if(document.editaddresskind.KindName.value=='')
  31.     {
  32.         alert("请输入通讯录分类!");
  33.         document.editaddresskind.KindName.focus();
  34.         return false;
  35.     }
  36. }
  37. </script>
  38. </head>
  39. <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
  40. <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  41.     <tr>
  42.         <td align="center" valign="top"><p>&nbsp;</p>
  43.             <table width="90%" border="1" cellpadding="3" cellspacing="0" bordercolordark="#ffffff" bordercolorlight="#0a0a0a" style="">
  44.                 <tr align="center" valign="middle" bgcolor="<%=m_session.GetString("TitleColor")%>">
  45.                     <th width="6%" height="24" nowrap><img src="/images/white.gif" width="12"></th>
  46.                     <th width="8%" nowrap><font color="#000000">序号</font></th>
  47.                     <th width="45%" nowrap><font color="#000000">通讯录分类</font></th>
  48.                     <th width="11%" nowrap><font color="#000000">添加</font></th>
  49.                     <th width="11%" nowrap><font color="#000000">修改</font></th>
  50.                     <th width="12%" nowrap><font color="#000000">删除</font></th>
  51.                 </tr>
  52.                 <%
  53. for(int i=0;i<vt.size();i++)
  54. {
  55.     String strID = ((Vector)vt.get(i)).get(0).toString();
  56.     if(!strID.equals((intAddressKindId + "")))
  57.     {
  58.         if(i % 2 == 0)
  59.             out.println("<tr id="Row"+ i+ "" class="DataRowsSingle" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsSingle');">");
  60.         else
  61.             out.println("<tr id="Row"+ i+ "" class="DataRowsDouble" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsDouble');">");
  62.         out.println("<td align="right" valign="middle"><img id="image" + i + "" src="../images/lastpost1.gif" style="display:none;"> </td>");
  63.         out.println("<td align="right" valign="middle">" + (i+1) + "</td>");
  64.         out.println("<td align="left" valign="middle" nowrap>" + ((Vector)vt.get(i)).get(1).toString() + "</td>");
  65.         out.println("<td align="center" valign="middle" nowrap>&nbsp;</td>");
  66.         out.println("<td align="center" valign="middle" nowrap><a href="EditAddressKind.jsp?ID=" + strID + "">修改</a></td>");
  67.         out.println("<td align="center" valign="middle" nowrap><a href="DelAddressKind.jsp?ID=" + strID + "" onclick="return confirm('您确实要删除该通讯录分类吗?\n删除该通讯录分类之前必须删除属于该通讯录分类的所有通讯信息,\n否则会出错,您是否继续?');">删除</a></td>");
  68.         out.println("</tr>");
  69.     }
  70.     else
  71.     {
  72. %>
  73.                 <form name="editaddresskind" action="EditAddressKindAction.jsp" method="post" onSubmit="javascript:return checkeditaddresskind();">
  74.                     <tr bgcolor="<%=m_session.GetString("TitleColor")%>">
  75.                         <th align="right" valign="middle" bgcolor="<%=m_session.GetString("TitleColor")%>">&nbsp;</th>
  76.                         <th align="right" valign="middle" bgcolor="<%=m_session.GetString("TitleColor")%>"><%=(i+1)+""%><input type="hidden" name="ID" value="<%=strID%>"></th>
  77.                         <th align="left" valign="middle" nowrap bgcolor="<%=m_session.GetString("TitleColor")%>">
  78.                             <input name="KindName" type="text" maxlength="20" Value="<%=((Vector)vt.get(i)).get(1).toString()%>"></th>
  79.               <input name="UserID" type="hidden" Value="<%=intUserId%>"></th>
  80.                         <th align="center" valign="middle" nowrap bgcolor="<%=m_session.GetString("TitleColor")%>">
  81.                             <input type="button" value="返回" onclick="location='AddressKindManage.jsp'"></th>
  82.                         <th align="center" valign="middle" nowrap bgcolor="<%=m_session.GetString("TitleColor")%>"><input type="submit" value="修改"></th>
  83.                         <th align="center" valign="middle" nowrap bgcolor="<%=m_session.GetString("TitleColor")%>"><a href="DelAddressKind.jsp?ID=<%=strID%>" onclick="return confirm('您确实要删除该通讯录分类吗?n删除该通讯录分类之前必须删除属于该通讯录分类的所有通讯信息,n否则会出错,您是否继续?');">删除</a></th>
  84.                     </tr>
  85.                 </form>
  86. <%
  87.     }
  88. }
  89. %>
  90.             </table>
  91.         </td>
  92.     </tr>
  93. </table>
  94. </body>
  95. </html>
  96. <%
  97. }
  98. %>