Position_update.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:2k
源码类别:
电子政务应用
开发平台:
Java
- <%@ page errorPage="/vnex/ErrorPage.jsp" %>
- <%@ page import="com.vnex.intranet.organization.value.*"%>
- <%@ page import="com.vnex.intranet.organization.proxy.*"%>
- <jsp:useBean id="positionProxyBean" scope="Application" class="com.vnex.intranet.organization.proxy.PositionProxyBean" />
- <jsp:useBean id="duvalue" scope="request" class="com.vnex.intranet.organization.value.DutyValueBean" />
- <jsp:useBean id="idList" scope="page" class="com.vnex.intranet.pub.IdList" />
- <jsp:setProperty name="duvalue" property="dutyId" />
- <jsp:setProperty name="duvalue" property="dutyTitle" />
- <jsp:setProperty name="duvalue" property="description" />
- <jsp:setProperty name="duvalue" property="demandSkill" />
- <jsp:setProperty name="duvalue" property="checkStandard" />
- <jsp:setProperty name="duvalue" property="divisionId" />
- <jsp:setProperty name="idList" property="ids" />
- <%
- String divisionName = request.getParameter("divisionName");
- positionProxyBean.modifyDuty(duvalue);
- int did = duvalue.getDutyId();
- ArrayList array = (ArrayList)positionProxyBean.getPrivilegesByDuty(did);
- ArrayList current = null;
- int[] ids =idList.getIds();
- if (ids !=null)
- {
- current = new ArrayList();
- for(int i=0;i<ids.length;i++)
- {
- PrivilegeValueBean pinfo = new PrivilegeValueBean();
- pinfo.setPrivilegeId(ids[i]);
- current.add(pinfo);
- }
- }
- if (array !=null && current !=null)
- {
- ArrayList middle = new ArrayList();
- middle.addAll(current);
- current.removeAll(array);
- array.removeAll(middle);
- }
- if (current!=null)
- {
- int[] idsnew = new int[current.size()];
- for(int i=0;i<current.size();i++)
- {
- idsnew[i] = ((PrivilegeValueBean)current.get(i)).getPrivilegeId();
- }
- positionProxyBean.addPrivilege(idsnew,1,did);
- }
- if (array!=null)
- {
- int[] idsremove = new int[array.size()];
- for(int j=0;j<array.size();j++)
- {
- idsremove[j] = ((PrivilegeValueBean)array.get(j)).getPrivilegeId();
- }
- positionProxyBean.removePrivileges(idsremove,did);
- }
- String link="/mainctrl/organization/getAllPosition?id=" + duvalue.getDivisionId() + "&name=" + divisionName;
- %>
- <jsp:forward page="<%=link%>" />