EditPayType.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 intPayTypeId = m_request.GetInt("ID");
  7. if(intPayTypeId<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 = PayTypeManager.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 checkEditPayType()
  27. {
  28.     if(document.EditPayType.TypeName.value=='')
  29.     {
  30.         alert("请输入工资条目!");
  31.         document.EditPayType.TypeName.focus();
  32.         return false;
  33.     }
  34.     if(document.EditPayType.OrderNumber.value=='')
  35.     {
  36.         alert("请输入排序编号!");
  37.         document.EditPayType.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((intPayTypeId + "")))
  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="EditPayType.jsp?ID=" + strID + "">修改</a></td>");
  73.         out.println("<td align="center" valign="middle" nowrap><a href="DelPayType.jsp?ID=" + strID + "" onclick="return confirm('您确实要删除该工资条目吗?\n删除该工资条目之前必须删除属于该工资条目的所有工资,\n否则会出错,您是否继续?');">删除</a></td>");
  74.         out.println("</tr>");
  75.     }
  76.     else
  77.     {
  78. %>
  79.                 <form name="EditPayType" action="EditPayTypeAction.jsp" method="post" onSubmit="javascript:return checkEditPayType();">
  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="TypeName" 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='PayTypeManage.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="DelPayType.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. %>