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

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.account.*"%>
  6. <%@ page import="com.redmoon.oa.person.*"%>
  7. <%@ page import="com.redmoon.oa.dept.*"%>
  8. <%@ page import = "cn.js.fan.web.*"%>
  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. <%@ include file="../inc/nocache.jsp"%>
  16. <script language="JavaScript" type="text/JavaScript">
  17. <!--
  18. //-->
  19. </script>
  20. <style type="text/css">
  21. <!--
  22. .style2 {font-size: 14px}
  23. .STYLE5 {color: #FF0000}
  24. .STYLE6 {color: #000000}
  25. -->
  26. </style>
  27. </head>
  28. <%
  29. String op = ParamUtil.get(request, "op");
  30. if (op.equals("modify")) {
  31. AccountMgr am = new AccountMgr();
  32. boolean re = false;
  33. try {
  34.   re = am.modify(request);
  35. }
  36. catch (ErrMsgException e) {
  37. out.print(StrUtil.Alert(e.getMessage()));
  38. }
  39. if (re) {  
  40.      out.print(StrUtil.Alert("操作成功"));
  41. //out.print(StrUtil.Alert_Redirect("操作成功!", "officeequip_type_list.jsp"));
  42. %>
  43.     <script>
  44. window.opener.location.reload();
  45. window.close();
  46. </script>
  47. <% }
  48. }%>
  49. <script>
  50. function setPerson(deptCode, deptName, user, userRealName)
  51. {
  52. form1.userRealName.value = userRealName;
  53. form1.userName.value = user;
  54. }
  55. </script>
  56. <body background="" leftmargin="0" topmargin="5" marginwidth="0" marginheight="0">
  57. <jsp:useBean id="fchar" scope="page" class="cn.js.fan.util.StrUtil"/>
  58. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  59. <%
  60.     String name = ParamUtil.get(request, "name");
  61. AccountDb adb = new AccountDb();
  62. adb = adb.getAccountDb(name);
  63. String userName = StrUtil.getNullString(adb.getUserName());
  64. String userRealName = "";
  65. if (!userName.equals("")) {
  66. UserMgr um = new UserMgr();
  67. UserDb user = um.getUserDb(userName);
  68. if (user==null || !user.isLoaded()) {
  69. out.print(StrUtil.Alert("该用户已不存在!"));
  70. }
  71. else
  72. userRealName = user.getRealName();
  73. }
  74. %>
  75. <TABLE border="0" cellspacing="0" bordercolor="#CCCCCC">
  76.    <form action="?op=modify" method="post" name="form1" id="form1" onSubmit="">
  77.     <TBODY>
  78.       <TR>
  79.         <TD colspan="4" align="left" class="right-title">&nbsp;工号修改  </TD>
  80.       </TR>
  81.       <TR>
  82.         <TD align="right" width="112">工&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号:</TD>
  83.         <TD width="272"><INPUT name="name" id="name" value="<%=adb.getName()%>" maxLength="255" readonly="">
  84.             <span class="STYLE5"> *</span></TD>
  85.       </TR>
  86.       <TR>
  87.         <TD align="right">姓 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名:</TD>
  88.         <td width="272"><input readonly name="userRealName" type="text" id="userRealName" value="<%=userRealName%>" size="20" >          
  89.           <input type=hidden name="userName" size=20 value="<%=userName%>">
  90.         <a href="#" onClick="javascript:showModalDialog('../user_sel.jsp',window.self,'dialogWidth:480px;dialogHeight:320px;status:no;help:no;')">选择用户</a></td>
  91.       </TR>
  92.       
  93.       <TR>
  94.         <TD colspan="4" align="center"><input name="button" type="submit" class="button1"  value="修改工号"></TD>
  95.       </TR>
  96.     </TBODY>
  97.   </FORM>
  98. </TABLE>
  99. </body>
  100. </html>