dgbas公文管理核心java源码

源代码在线查看: orgdocservlet.java

软件大小: 5668 K
上传用户: apsdn
关键词: dgbas java 核心 源码
下载地址: 免注册下载 普通下载 VIP

相关代码

				package com.jasson.business.system;
				import java.io.*;
				import javax.servlet.*;
				import javax.servlet.http.*;
				import com.jasson.common.*;
				import com.jasson.business.document.RecipientDAO;
				public class OrgDocServlet  extends HttpServlet{
				   public void service(HttpServletRequest request, HttpServletResponse  response) throws IOException, ServletException {
				     HttpSession session = (HttpSession)request.getSession();
				     ExtendString ExStr=new ExtendString();
				     request.setCharacterEncoding("ISO8859-1");
				     if(request.getParameter("RecipientID")!=null)	
				     {
					     if(((String)request.getParameter("Flag")).equals("Edit"))
					     {
					     	     RecipientDAO recipientDAO=new RecipientDAO();
					     	     recipientDAO.setRecipientID(Integer.parseInt((String)request.getParameter("RecipientID")));
						     recipientDAO.setRecipientName(ExStr.formDecode((String)request.getParameter("OrgName")));
						     recipientDAO.setRecipientAddress(ExStr.formDecode((String)request.getParameter("Addr")));
						     recipientDAO.setZipCode(ExStr.formDecode((String)request.getParameter("ZipCode")));
						     recipientDAO.setOrgID(ExStr.formDecode((String)request.getParameter("OrgID")));
						     recipientDAO.seteTransfer((String)request.getParameter("Transfer"));
						     recipientDAO.update();
					        
					     }
					     if(((String)request.getParameter("Flag")).equals("Add"))
					     {
						     RecipientDAO recipientDAO=new RecipientDAO();
						     recipientDAO.setRecipientName(ExStr.formDecode((String)request.getParameter("OrgName")));
						     recipientDAO.setRecipientAddress(ExStr.formDecode((String)request.getParameter("Addr")));
						     recipientDAO.setZipCode(ExStr.formDecode((String)request.getParameter("ZipCode")));
						     recipientDAO.setOrgID(ExStr.formDecode((String)request.getParameter("OrgID")));
						     recipientDAO.seteTransfer((String)request.getParameter("Transfer"));
						     recipientDAO.insert();
					     }
					     if(((String)request.getParameter("Flag")).equals("Read"))
					     {
					            RecipientDAO recipientDAO=new RecipientDAO();
					            recipientDAO=recipientDAO.find(Integer.parseInt((String)request.getParameter("RecipientID")));
					            request.setAttribute("RecipientDAO",recipientDAO);
					            request.setAttribute("pageSel",request.getParameter("pageSel"));
					            forward("/DMS/system/OrgAddEdit.jsp",request,response);
					            return;
					     }
				      } 
				     if(request.getParameter("Sel")!=null)	     
				     {
				        RecipientDAO recipientDAO=new RecipientDAO();
				        int maxSelCount=request.getParameterValues("Sel").length;
				        String[] SelValues=new String[10000];
				        SelValues=(String[])request.getParameterValues("Sel");
				     	for(int i=0;i				     	   recipientDAO.delete(Integer.parseInt(SelValues[i]));
				     }
				     int NumOfCount=1;
				     if(request.getParameter("pageSel")!=null)
				       NumOfCount=Integer.parseInt((String)request.getParameter("pageSel"));
				     
				     RecipientDAO[] recipientDAOs=RecipientDAO.findAll(NumOfCount,10,ExStr.formDecode(ExStr.nullToSpace(request.getParameter("Condition"))));
				     request.setAttribute("RecipientDAO",recipientDAOs);
				     request.setAttribute("pageSel",NumOfCount+"");
				     forward("/DMS/system/OrgDocList.jsp",request,response);
				   }  
				       /**
				     * 			

相关资源