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

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 intAddressListId = m_request.GetInt("ID");
  7. if(intAddressListId<1)
  8. {
  9. %>
  10. <script language="JavaScript" type="text/JavaScript">
  11. alert("请选择正确的通讯录,修改失败!");
  12. history.back();
  13. </script>
  14. <%
  15. }
  16. else
  17. {
  18. int intUserID = m_session.GetInt("UserID");
  19. Vector vt = AddressListManager.getRecordByID(intAddressListId,intUserID);
  20. if(vt.size()==1)
  21. {
  22. %>
  23. <html>
  24. <head>
  25. <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
  26. <title>通讯录管理-- GForce OA 2.0</title>
  27. <link href="../css/txt.jsp" rel="stylesheet" type="text/css">
  28. <SCRIPT language="JavaScript" src="/Calendar/PopUpCalendarDlg.js"></SCRIPT>
  29. <script language="JavaScript" type="text/javascript">
  30. function checkeditaddresslist()
  31. {
  32.     if(document.editaddresslist.Name.value=='')
  33.     {
  34.         alert("请输入姓名!");
  35.         document.editaddresslist.Name.focus();
  36.         return false;
  37.     }
  38.     if(document.editaddresslist.BirthDate.value!="")
  39.     {
  40.       if(!isDate(document.editaddresslist.BirthDate.value))
  41.       {
  42.           alert("日期格式错误,请按照“2002-02-18”重新输入!");
  43.           document.editaddresslist.BirthDate.focus();
  44.           return false;
  45.       }
  46.     }
  47. }
  48. </script>
  49. </head>
  50. <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
  51. <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  52.     <tr>
  53.         <td align="center" valign="top"><p>&nbsp;</p>
  54.            <table width="90%" border="0" cellpadding="0" cellspacing="0">
  55.                 <tr align="center" valign="middle">
  56.                 <th nowrap colspan=2 align="center"><font color="#000000">修 改 通 讯 录</font></th>
  57.               </tr>
  58.                <tr><td>&nbsp;</td>
  59.                 </tr>
  60.               </table>
  61.             <form name="editaddresslist" action="EditAddressListAction.jsp" method="post" onSubmit="javascript:return checkeditaddresslist();">
  62.             <table  border="1" cellpadding="1" cellspacing="1" width="90%">
  63.                 <tr>
  64.                     <td align="right" valign="middle" width="14%"><font color="#0A0A0A">姓&nbsp;&nbsp;&nbsp;&nbsp;名:&nbsp;</font></td>
  65.                     <td align="left" valign="middle" width="35%" nowrap>
  66.                         &nbsp;<input name="Name" type="text" maxlength="50" value="<%=((Vector)vt.get(0)).get(1).toString()%>">
  67.                         <input name="ID" type="Hidden" value="<%=((Vector)vt.get(0)).get(0).toString()%>" >
  68.                     </td>
  69.                     <td align="right" valign="middle" width="14%"><font color="#0A0A0A">性&nbsp;&nbsp;&nbsp;&nbsp;别:&nbsp;</font></td>
  70.                     <td align="left" valign="middle" width="35%" nowrap>
  71.                         &nbsp;<font color="#0A0A0A"><input name="Sex" type="radio" value="男"<%if(((Vector)vt.get(0)).get(2).toString().equalsIgnoreCase("男"))out.print("checked");%>>男
  72.                         &nbsp;&nbsp;&nbsp;&nbsp;<input name="Sex" type="radio" value="女" <%if(((Vector)vt.get(0)).get(2).toString().equalsIgnoreCase("女"))out.print("checked");%>>女</font>
  73.                    </td>
  74.                 </tr>
  75.                 <tr>
  76.                    <td align="right" valign="middle" width="14%"><font color="#0A0A0A">通讯录分类:&nbsp;</font></td>
  77.                     <td align="left" valign="middle" nowrap>
  78.                          &nbsp;<select name="KindsID">
  79. <%
  80. Vector vtKinds = AddressKindManager.getAllRecord(intUserID);
  81. for(int i=0;i<vtKinds.size();i++)
  82. {
  83.     if(((Vector)vtKinds.get(i)).get(0).toString().equalsIgnoreCase(((Vector)vt.get(0)).get(5).toString()))
  84.         out.println("<option value="" + ((Vector)vtKinds.get(i)).get(0).toString() + "" selected>" + ((Vector)vtKinds.get(i)).get(1).toString() + "</option>");
  85.     else
  86.         out.println("<option value="" + ((Vector)vtKinds.get(i)).get(0).toString() + "">" + ((Vector)vtKinds.get(i)).get(1).toString() + "</option>");
  87. }
  88. %>
  89.                         </select>
  90.                     </td>
  91.                     <td align="right" valign="middle" width="14%"><font color="#0A0A0A">出生日期:&nbsp;</font></td>
  92.                     <td align="left" valign="middle" nowrap>
  93.                          &nbsp;<input name="BirthDate" type="text"  value="<%=StringNew.GetDateString(((Vector)vt.get(0)).get(3).toString(),"yyyy-MM-dd")%>" onFocus="JavaScript:this.value=fPopUpCalendarDlg(this.value,-100,-2);" maxlength="50" onDblClick="JavaScript:this.value=fPopUpCalendarDlg(this.value,-100,-2);">
  94.                    </td>
  95.                 </tr>
  96.                  <tr>
  97.                     <td align="right" valign="middle" width="14%"><font color="#0A0A0A">移动电话:&nbsp;</font></td>
  98.                     <td align="left" valign="middle" nowrap>
  99.                         &nbsp;<input name="MobileNum" type="text" maxlength="50" value="<%=((Vector)vt.get(0)).get(10).toString()%>">
  100.                    </td>
  101.                     <td align="right" valign="middle" width="14%"><font color="#0A0A0A">家庭电话:&nbsp;</font></td>
  102.                     <td align="left" valign="middle" nowrap>
  103.                         &nbsp;<input name="HomeTel" type="text" maxlength="50" value="<%=((Vector)vt.get(0)).get(8).toString()%>">
  104.                    </td>
  105.                 </tr>
  106.                 <tr>
  107.                     <td align="right" valign="middle" width="14%"><font color="#0A0A0A">单位电话:&nbsp;</font></td>
  108.                     <td align="left" valign="middle" nowrap>
  109.                         &nbsp;<input name="OfficeTel" type="text" maxlength="50" value="<%=((Vector)vt.get(0)).get(9).toString()%>">
  110.                    </td>
  111.                     <td align="right" valign="middle" width="14%"><font color="#0A0A0A">传真号码:&nbsp;</font></td>
  112.                     <td align="left" valign="middle" nowrap>
  113.                         &nbsp;<input name="Fax" type="text" maxlength="50" value="<%=((Vector)vt.get(0)).get(11).toString()%>">
  114.                    </td>
  115.                 </tr>
  116.                 <tr>
  117.                     <td align="right" valign="middle" width="14%"><font color="#0A0A0A">工作单位:&nbsp;</font></td>
  118.                     <td align="left" valign="middle" nowrap>
  119.                         &nbsp;<input name="Company" type="text" maxlength="30"  value="<%=((Vector)vt.get(0)).get(4).toString()%>">
  120.                    </td>
  121.                    <td align="right" valign="middle" width="14%"><font color="#0A0A0A">职&nbsp;&nbsp;&nbsp;&nbsp;务:&nbsp;</font></td>
  122.                     <td align="left" valign="middle" nowrap>
  123.                         &nbsp;<input name="Place" type="text" maxlength="50" value="<%=((Vector)vt.get(0)).get(7).toString()%>">
  124.                    </td>
  125.                 </tr>
  126.                 <tr>
  127.                    <td align="right" valign="middle" width="14%"><font color="#0A0A0A">单位地址:&nbsp;</font></td>
  128.                     <td align="left" valign="middle" colspan="3" nowrap>
  129.                         &nbsp;<input name="CompanyAddr" type="text" maxlength="100" size="50" value="<%=((Vector)vt.get(0)).get(13).toString()%>">
  130.                    </td>
  131.                 </tr>
  132.                 <tr>
  133.                     <td align="right" valign="middle" width="14%"><font color="#0A0A0A">家庭地址:&nbsp;</font></td>
  134.                     <td align="left" valign="middle" colspan="3" nowrap>
  135.                         &nbsp;<input name="HomeAddr" type="text" maxlength="100" size="50" value="<%=((Vector)vt.get(0)).get(14).toString()%>">
  136.                    </td>
  137.                 </tr>
  138.                 <tr>
  139.                    <td align="right" valign="middle" width="14%"><font color="#0A0A0A">QQ号码:&nbsp;</font></td>
  140.                     <td align="left" valign="middle" nowrap>
  141.                         &nbsp;<input name="QQNumber" type="text" maxlength="50" value="<%=((Vector)vt.get(0)).get(15).toString()%>">
  142.                    </td>
  143.                    <td align="right" valign="middle" width="14%"><font color="#0A0A0A">MSN号码:&nbsp;</font></td>
  144.                     <td align="left" valign="middle" nowrap>
  145.                         &nbsp;<input name="MsnNumber" type="text" maxlength="50" value="<%=((Vector)vt.get(0)).get(16).toString()%>">
  146.                    </td>
  147.                 </tr>
  148.                 <tr>
  149.                     <td align="right" valign="middle" width="14%"><font color="#0A0A0A">电子信箱:</font></td>
  150.                     <td align="left" valign="middle" nowrap>
  151.                         &nbsp;<input name="E_mail" type="text" maxlength="30"  value="<%=((Vector)vt.get(0)).get(12).toString()%>">
  152.                    </td>
  153.                     <td align="right" valign="middle" width="14%"><font color="#0A0A0A">是否共享:&nbsp;</font></td>
  154.                     <td align="left" valign="middle" nowrap>
  155.                         &nbsp;<font color="#0A0A0A"><input name="IsOpen" type="radio" value="1" <%if(((Vector)vt.get(0)).get(6).toString().equalsIgnoreCase("true"))out.print("checked");%>>公开共享&nbsp;&nbsp;&nbsp;&nbsp;
  156.                                               <input name="IsOpen" type="radio" value="0" <%if(((Vector)vt.get(0)).get(6).toString().equalsIgnoreCase("false"))out.print("checked");%>>私人保密</font>
  157.                     </td>
  158.                 </tr>
  159.                 <tr>
  160.                     <td align="right" valign="middle" width="14%"><font color="#0A0A0A">备  注:</font></td>
  161.                     <td align="left" valign="middle" colspan="3" nowrap>
  162.                         &nbsp;<textarea name="Remark" cols="70" rows="3"><%=((Vector)vt.get(0)).get(17).toString()%></textarea>
  163.                    </td>
  164.                 </tr>
  165.             </table>
  166.              <table width="90%" border="0">
  167.                 <tr>
  168.                     <td>&nbsp;</td>
  169.                </tr>
  170.                 <tr>
  171.                   <td>&nbsp;</td>
  172.                    <td align="right" valign="middle" nowrap>
  173.                         <input type="submit" value="修 改" style="background-color: #FFFFFF; border: 1 solid #000000">&nbsp;&nbsp;&nbsp;&nbsp;<input type="reset" value="重 填" style="background-color: #FFFFFF; border: 1 solid #000000">&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value="返 回" onclick="window.location='AddressListManage.jsp?KindsID=<%=((Vector)vt.get(0)).get(5).toString()%>';" style="background-color: #FFFFFF; border: 1 solid #000000">
  174.                     </td>
  175.                 </tr>
  176.                 <tr>
  177.                     <td align="right" valign="middle">&nbsp;</td>
  178.                </tr>
  179.             </table>
  180.             </form>
  181.         </td>
  182.     </tr>
  183. </table>
  184. </body>
  185. </html>
  186. <%
  187. }
  188. else
  189. {
  190. %>
  191. <script language="JavaScript" type="text/JavaScript">
  192. alert("该记录已经被删除或者您没有权限修改此记录,修改失败!");
  193. history.back();
  194. </script>
  195. <%
  196. }
  197. }
  198. %>