archive_profession_edit.jsp
上传用户:jhtang88
上传日期:2014-01-27
资源大小:28528k
文件大小:6k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html; charset=utf-8"%>
  2. <%@ page import = "java.net.URLEncoder"%>
  3. <%@ page import = "java.util.*"%>
  4. <%@ page import = "cn.js.fan.util.*"%>
  5. <%@ page import = "com.redmoon.oa.archive.*"%>
  6. <%@ page import = "com.redmoon.oa.person.*"%>
  7. <%@ page import = "cn.js.fan.web.*"%>
  8. <%@ page import = "com.redmoon.oa.BasicDataMgr"%>
  9. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  10. <html>
  11. <head>
  12. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  13. <title>添加专业修改</title>
  14. <link href="../common.css" rel="stylesheet" type="text/css">
  15. <script language="JavaScript" type="text/JavaScript">
  16. <!--
  17. function findObj(theObj, theDoc)
  18. {
  19.   var p, i, foundObj;
  20.   
  21.   if(!theDoc) theDoc = document;
  22.   if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)
  23.   {
  24.     theDoc = parent.frames[theObj.substring(p+1)].document;
  25.     theObj = theObj.substring(0,p);
  26.   }
  27.   if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
  28.   for (i=0; !foundObj && i < theDoc.forms.length; i++) 
  29.     foundObj = theDoc.forms[i][theObj];
  30.   for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) 
  31.     foundObj = findObj(theObj,theDoc.layers[i].document);
  32.   if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);
  33.   
  34.   return foundObj;
  35. }
  36. var GetDate=""; 
  37. function SelectDate(ObjName,FormatDate){
  38. var PostAtt = new Array;
  39. PostAtt[0]= FormatDate;
  40. PostAtt[1]= findObj(ObjName);
  41. GetDate = showModalDialog("../util/calendar/calendar.htm", PostAtt ,"dialogWidth:286px;dialogHeight:221px;status:no;help:no;");
  42. }
  43. function SetDate()
  44. findObj(ObjName).value = GetDate; 
  45. }
  46. function chkContent(){
  47.    if(form1.userName.value == ""){
  48.      alert("用户名不能为空!")
  49.  form1.userName.focus();
  50.  return false
  51.    }
  52. }
  53. function setPerson(deptCode, deptName, user, userRealName)
  54. {
  55. form1.userName.value = user;
  56. form1.userRealName.value = userRealName;
  57. }
  58. //-->
  59. </script>
  60. <style type="text/css">
  61. <!--
  62. .style2 {font-size: 14px}
  63. -->
  64. </style>
  65. </head>
  66. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  67. <jsp:useBean id="archivePrivilege" scope="page" class="com.redmoon.oa.archive.ArchivePrivilege"/>
  68. <%
  69. String userName = ParamUtil.get(request,"userName");
  70. if (!privilege.isUserPrivValid(request, "archive.profession")||!archivePrivilege.canAdminUser(request,userName)) {
  71. out.print(StrUtil.Alert_Back(SkinUtil.LoadString(request, "pvg_invalid")));
  72. return;
  73. }
  74. String op = ParamUtil.get(request,"op");
  75. if (op.equals("modify")) {
  76.    UserProfessionMgr upm = new UserProfessionMgr();
  77.    boolean re = false;
  78.    try {  
  79.  re = upm.modify(request);
  80.    }
  81.    catch(ErrMsgException e){
  82.  out.print(StrUtil.Alert(e.getMessage()));
  83.    }
  84.    if (re) {
  85.  out.print(StrUtil.Alert_Back(SkinUtil.LoadString(request,"res.module.archive", "success_modify_profession")));
  86.    } 
  87. }
  88. %>
  89. <body background="" leftmargin="0" topmargin="5" marginwidth="0" marginheight="0">
  90. <%@ include file="archive_inc_menu_top.jsp"%>
  91. <%
  92. String strId = ParamUtil.get(request, "id");
  93. if (!StrUtil.isNumeric(strId)) {
  94. out.println(StrUtil.Alert_Back(SkinUtil.LoadString(request, "res.module.archive","warn_id_err_archive")));
  95. return;
  96. }
  97. int id = Integer.parseInt(strId);
  98. UserProfessionDb udb = new UserProfessionDb();
  99. udb = udb.getUserProfessionDb(id);
  100. UserInfoDb uid = new UserInfoDb();
  101. uid = uid.getUserInfoDb(userName);
  102. String userRealName = uid.getUserRealName();
  103. BasicDataMgr bdm = new BasicDataMgr("archive");
  104. String options = "";
  105. %>
  106. <br>
  107. <table class="main" cellSpacing="1" cellPadding="2" width="600" align="center" border="0">
  108. <form action="?op=modify&id=<%=id%>" name="form1" method="post">
  109.   <tbody>
  110.     <tr>
  111.       <td colspan="2" noWrap class="right-title">修改专业技能信息</td>
  112.     </tr>
  113.     <tr>
  114.       <td class="TableContent" noWrap>用户名称:</td>
  115.       <td class="TableData"><input maxLength="100" name="userRealName" size="20" readonly value="<%=userRealName%>"><input name="userName" type="hidden" value="<%=userName%>"></td>
  116.     </tr>
  117.     <tr>
  118.       <td class="TableContent" noWrap>专业技术职务:</td>
  119.       <td class="TableData">
  120.    <%options = bdm.getOptionsStr("profession");%>
  121. <select name="profession">
  122. <%=options%>
  123.         </select>
  124. <script language="JavaScript">
  125. <!--
  126. form1.profession.value="<%=udb.getProfession()%>";
  127. //-->
  128. </script>
  129.     </tr>
  130.     <tr>
  131.       <td class="TableContent" noWrap>证书名称:</td>
  132.       <td class="TableData"><input name="name" id="name" size="36" maxLength="200" value="<%=udb.getName()%>"></td>
  133.     </tr>
  134.     <tr>
  135.       <td class="TableContent" noWrap>证书编号:</td>
  136.       <td class="TableData"><input name="cnum" id="cnum" size="36" maxLength="200" value="<%=udb.getCnum()%>"></td>
  137.     </tr>
  138.     <tr>
  139.       <td class="TableContent" noWrap>获取时间:</td>
  140.       <td class="TableData"><input name="myDate" id="myDate" size="20" value="<%=udb.getMyDate()%>" readonly>
  141.         <img style="CURSOR: hand" onClick="SelectDate('myDate', 'yyyy-MM-dd')" src="../images/form/calendar.gif" align="absMiddle" border="0" width="26" height="26">日期格式形如 1999-1-2</td>
  142.     </tr>
  143.     <tr>
  144.       <td class="TableContent" noWrap>专长:</td>
  145.       <td class="TableData"><input name="special" id="special" size="36" maxLength="200" value="<%=udb.getSpecial()%>"></td>
  146.     </tr>
  147.     
  148.     <tr>
  149.       <td class="TableContent" noWrap>备注:</td>
  150.       <td class="TableData"><textarea name="remark" cols="45" rows="3" wrap="yes" class="BigINPUT" id="remark"><%=udb.getRemark()%></textarea></td>
  151.     </tr>
  152.     <tr class="TableControl" align="middle">
  153.       <td colSpan="2" align="center" noWrap><input name="submit" type="submit" class="BigButton" value="提交" onClick="return chkContent()">
  154.         &nbsp;&nbsp;
  155.           <input name="button" type="reset" class="BigButton" value="重填">
  156.         &nbsp;&nbsp;</td>
  157.     </tr>
  158.   </tbody>
  159.   </form>
  160. </table>
  161. </body>
  162. </html>