add_receiver.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:2k
源码类别:
电子政务应用
开发平台:
Java
- <%@ page errorPage="/vnex/ErrorPage.jsp" %>
- <%@ page import="java.util.Vector"%>
- <%@ page import="com.vnex.intranet.communication.message.value.MessageValueBean" %>
- <jsp:useBean id="cu" scope="request" class="com.vnex.intranet.communication.util.CommunicationUtil" />
- <jsp:useBean id="BusinessName" scope="session" class="com.vnex.intranet.pub.BusinessSession" />
- <jsp:useBean id="tmvb" scope="request" class="com.vnex.intranet.communication.message.value.MessageValueBean" />
- <jsp:setProperty name="tmvb" property="*" />
- <%
- MessageValueBean mvb = new MessageValueBean();
- Vector vect = new Vector();
- if(session.getAttribute("receiver") != null)
- {
- vect = (Vector)session.getAttribute("receiver");
- }
- mvb.setDeptId(Integer.parseInt(request.getParameter("deptId")));
- mvb.setEmpId(Integer.parseInt(request.getParameter("empId")));
- mvb.setReceiverName(cu.selectEmpName(mvb.getEmpId()));
- mvb.setDept(cu.selectDeptNameByEmpId(mvb.getEmpId()));
- if(vect.size()>0)
- {
- boolean contain = false;
- for(int i=0;i<vect.size();i++)
- {
- MessageValueBean mmvb = (MessageValueBean)vect.elementAt(i);
- if(mmvb.getEmpId() == mvb.getEmpId() || mvb.getEmpId() == BusinessName.getEmpId())
- {
- contain = true;
- break;
- }
- }
- if(!contain)
- vect.add(mvb);
- }
- else
- if(mvb.getEmpId() != BusinessName.getEmpId())
- vect.add(mvb);
- session.setAttribute("receiver", vect);
- String pageTo = "/mainctrl/msg/sendMsg";
- if(request.getParameter("pageTo") != null)
- {
- if(request.getParameter("pageTo").equals("1"))
- pageTo = "/mainctrl/msg/sentDetail";
- }
- String deptId = request.getParameter("deptId");
- String msgId = request.getParameter("msgId");
- %>
- <input type="hidden" name="deptId" value="<%=deptId%>" >
- <input type="hidden" name="msgId" value="<%=msgId%>">
- <jsp:forward page="<%=pageTo%>" />