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

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. <html>
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
  7. <title>请假管理-- GForce OA 2.0</title>
  8. <link href="/css/txt.jsp" rel="stylesheet" type="text/css">
  9. </HEAD>
  10. <%
  11. Request m_request = new Request(request);
  12. int iSysDirID = m_request.GetInt("SysDirID");
  13. ErrandApplyManager manager = new ErrandApplyManager();
  14. int intLeaveApplyID = 0;
  15. intLeaveApplyID = manager.UpdateRecord(new Request(request));
  16. if(intLeaveApplyID>0)
  17. {
  18.   intLeaveApplyID = m_request.GetInt("ID");
  19.   int iMaxApproveLevel = m_request.GetInt("ApproveLevel");
  20.   ApproveRecordManager.delApproveRecord(intLeaveApplyID,"请假申请");
  21.   for(int i=0;i<iMaxApproveLevel;i++)
  22.   {
  23.     ApproveRecordManager.insertApproveRecord("请假申请",intLeaveApplyID,m_request.GetInt("ApproveUserID" + (i+1)),i+1);
  24.   }
  25. %>
  26. <script language="JavaScript" type="text/JavaScript">
  27. alert("请假申请修改成功!");
  28. window.location="LeaveApplyManage.jsp?SysDirID=<%=iSysDirID%>";
  29. </script>
  30. <%
  31. }
  32. else if(intLeaveApplyID==-3)
  33. {
  34. %>
  35. <script language="JavaScript" type="text/JavaScript">
  36. alert("要修改的请假申请不存在,修改失败!");
  37. history.back();
  38. </script>
  39. <%
  40. }
  41. else if(intLeaveApplyID==-1)
  42. {
  43. %>
  44. <script language="JavaScript" type="text/JavaScript">
  45. alert("已经存在相同名称请假申请,修改失败!");
  46. history.back();
  47. </script>
  48. <%
  49. }
  50. else
  51. {
  52. %>
  53. <script language="JavaScript" type="text/JavaScript">
  54. alert("未知错误,修改失败,请与管理员联系!<%=intLeaveApplyID%>");
  55. history.back();
  56. </script>
  57. <%
  58. }
  59. %>
  60. </HTML>