modify_address_list_process.jsp
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:2k
源码类别:

电子政务应用

开发平台:

Java

  1. <%@ page errorPage="/vnex/ErrorPage.jsp" %>
  2. <%@ page import="java.util.*" %>
  3. <%@ page import="com.vnex.intranet.util.*" %>
  4. <%@ page import="com.vnex.intranet.addresslist.value.ContactXValueBean" %>
  5. <jsp:useBean id="addressProxy" scope="request" class="com.vnex.intranet.addresslist.proxy.AddressProxyBean" />
  6. <jsp:useBean id="avb" scope="request" class="com.vnex.intranet.addresslist.value.AddresslistValueBean" />
  7. <jsp:setProperty name="avb" property="*" />
  8. <%
  9.     String[] cgs = request.getParameterValues("contactGrp");
  10.     if(cgs != null)
  11.     {
  12.        Vector vect = new Vector();
  13.        for(int i=0;i<cgs.length;i++)
  14.        {
  15.           if(cgs[i].equals("0"))
  16.             continue;
  17.           ContactXValueBean cvb = new ContactXValueBean();
  18.           cvb.setContactId(Integer.parseInt(request.getParameter("contactId")));
  19.           cvb.setGroupId(Integer.parseInt(cgs[i]));
  20.           vect.add(cvb);
  21.        }
  22.        avb.setContactGroup(vect);
  23.     }
  24.     String bDate = request.getParameter("bDate");
  25.     if(! bDate.equals(""))
  26.     {
  27.        bDate += " 00:00:00";
  28.        Calendar cal = TimeStamp.convertTimestampToCalendar(TimeStamp.toTimestamp(bDate));
  29.        avb.setBirthday(cal);
  30.     }
  31.     avb.setContactId(Integer.parseInt(request.getParameter("contactId")));
  32.     addressProxy.modifyBook(avb);
  33. %>
  34. <html>
  35. <head>
  36. <script language=javascript>
  37. function forward()
  38. {
  39. document.location = "/mainctrl/addressbook/home?start=<%=request.getParameter("start")%>";
  40. }
  41. </script>
  42. </head>
  43. <body onload="javascript:forward()">
  44. </body>
  45. <html>