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

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. int intPlaceId = m_request.GetInt("ID");
  7. int iDepartmentID = m_request.GetInt("DepartmentID");
  8. if(intPlaceId<1)
  9. {
  10. %>
  11. <script language="JavaScript" type="text/JavaScript">
  12. alert("请选择正确的职务,修改失败!");
  13. history.back();
  14. </script>
  15. <%
  16. }
  17. else
  18. {
  19. Vector vt = PlaceManager.getRecordByDepartmentID(iDepartmentID);
  20. %>
  21. <html>
  22. <head>
  23. <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
  24. <title>职务管理-- GForce OA 2.0</title>
  25. <link href="../css/txt.jsp" rel="stylesheet" type="text/css">
  26. <script language="JavaScript" src="/js/changestyle.js"></script>
  27. <script language="JavaScript" type="text/javascript">
  28. function checkeditplace()
  29. {
  30.     if(document.editplace.PlaceName.value=='')
  31.     {
  32.         alert("请输入职务名称!");
  33.         document.editplace.PlaceName.focus();
  34.         return false;
  35.     }
  36.     if(document.editplace.DepartmentID.value=='')
  37.     {
  38.         alert("请选择所属部门!");
  39.         document.editplace.DepartmentID.focus();
  40.         return false;
  41.     }
  42. }
  43. </script>
  44. </head>
  45. <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0" onload="javascript:selectDefaultValue(document.all.GoByDepartmentID,<%=iDepartmentID%>);selectDefaultValue(document.editplace.DepartmentID,<%=iDepartmentID%>);">
  46. <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  47.     <tr>
  48.         <td align="center" valign="top"><p>&nbsp;</p>
  49.             <table width="90%" border="1" cellpadding="3" cellspacing="0" bordercolordark="#ffffff" bordercolorlight="#0a0a0a" style="">
  50.                 <tr align="right" valign="middle">
  51.                     <th colspan="7" nowrap align="right"><font color="#0A0A0A">当前职务所属部门:</font>
  52.                         <select name="GoByDepartmentID"  id="GoByDepartmentID" onchange="javascript:self.location='PlaceManage.jsp?DepartmentID='+this.value;">
  53.                         <option value="">请选择所属部门</option>
  54.                         <script language="JavaScript" src="/js/AddDepartment.jsp"></script>
  55.                         </select>
  56.                     </th>
  57.                 </tr>
  58.                 <tr align="center" valign="middle" bgcolor="<%=m_session.GetString("TitleColor")%>">
  59.                     <th width="6%" height="24" nowrap><img src="/images/white.gif" width="12"></th>
  60.                     <th width="8%" nowrap><font color="#000000">序号</font></th>
  61.                     <th width="52%" nowrap><font color="#000000">职务名称</font></th>
  62.                     <th width="11%" nowrap><font color="#000000">返回</font></th>
  63.                     <th width="11%" nowrap><font color="#000000">修改</font></th>
  64.                     <th width="12%" nowrap><font color="#000000">删除</font></th>
  65.                 </tr>
  66.                 <%
  67. for(int i=0;i<vt.size();i++)
  68. {
  69.     String strID = ((Vector)vt.get(i)).get(0).toString();
  70.     if(!strID.equals((intPlaceId + "")))
  71.     {
  72.         if(i % 2 == 0)
  73.             out.println("<tr id="Row"+ i+ "" class="DataRowsSingle" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsSingle');">");
  74.         else
  75.             out.println("<tr id="Row"+ i+ "" class="DataRowsDouble" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsDouble');">");
  76.         out.println("<td align="right" valign="middle"><img id="image" + i + "" src="../images/lastpost1.gif" style="display:none;"> </td>");
  77.         out.println("<td align="right" valign="middle">" + (i+1) + "</td>");
  78.         out.println("<td align="left" valign="middle" nowrap>" + ((Vector)vt.get(i)).get(1).toString() + "</td>");
  79.         out.println("<td align="center" valign="middle" nowrap>&nbsp;</td>");
  80.         out.println("<td align="center" valign="middle" nowrap><a href="EditPlace.jsp?ID=" + strID + "">修改</a></td>");
  81.         out.println("<td align="center" valign="middle" nowrap><a href="DelPlace.jsp?ID=" + strID + "" onclick="return confirm('您确实要删除该职务吗?\n删除该职务之前必须删除属于该职务的所有员工,\n否则会出错,您是否继续?');">删除</a></td>");
  82.         out.println("</tr>");
  83.     }
  84.     else
  85.     {
  86. %>
  87.                 <form name="editplace" action="EditPlaceAction.jsp" method="post" onSubmit="javascript:return checkeditplace();">
  88.                     <tr bgcolor="<%=m_session.GetString("TitleColor")%>">
  89.                         <th align="right" valign="middle" bgcolor="<%=m_session.GetString("TitleColor")%>">&nbsp;</th>
  90.                         <th align="right" valign="middle" bgcolor="<%=m_session.GetString("TitleColor")%>"><%=(i+1)+""%><input type="hidden" name="ID" value="<%=strID%>"></th>
  91.                         <th align="left" valign="middle" nowrap bgcolor="<%=m_session.GetString("TitleColor")%>">
  92.                             <input name="PlaceName" type="text" maxlength="50" Value="<%=((Vector)vt.get(i)).get(1).toString()%>">
  93.                         <select name="DepartmentID">
  94.                             <option value="">请选择所属部门</option>
  95.                         <script language="JavaScript" src="/js/AddDepartment.jsp"></script>
  96.                         </select>
  97.                         </th>
  98.                         <th align="center" valign="middle" nowrap bgcolor="<%=m_session.GetString("TitleColor")%>">
  99.                             <input type="button" value="返回" onclick="location='PlaceManage.jsp'"></th>
  100.                         <th align="center" valign="middle" nowrap bgcolor="<%=m_session.GetString("TitleColor")%>"><input type="submit" value="修改"></th>
  101.                         <th align="center" valign="middle" nowrap bgcolor="<%=m_session.GetString("TitleColor")%>"><a href="DelPlace.jsp?ID=<%=strID%>" onclick="return confirm('您确实要删除该职务吗?n删除该职务之前必须删除属于该职务的所有员工,n否则会出错,您是否继续?');">删除</a></th>
  102.                     </tr>
  103.                 </form>
  104. <%
  105.     }
  106. }
  107. %>
  108.             </table>
  109.         </td>
  110.     </tr>
  111. </table>
  112. </body>
  113. </html>
  114. <%
  115. }
  116. %>