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