KhcpxzSelectOne.java
上传用户:quasar007
上传日期:2022-08-11
资源大小:4067k
文件大小:2k
源码类别:

企业管理

开发平台:

Java

  1. package com.webtier.KhcpxzAction;
  2. import org.apache.struts.action.ActionMapping;
  3. import org.apache.struts.action.ActionForm;
  4. import javax.servlet.http.HttpServletRequest;
  5. import javax.servlet.http.HttpServletResponse;
  6. import org.apache.struts.action.ActionForward;
  7. import com.domain.KhcpxzForm;
  8. import org.apache.struts.action.Action;
  9. import com.service.KhcpxzFacade;
  10. import com.service.KhcpxzFacadeImpl;
  11. import com.service.KhxxFacade;
  12. import com.service.KhxxFacadeImpl;
  13. //单独查找
  14. public class KhcpxzSelectOne
  15.     extends Action {
  16.   private KhcpxzFacade khcpxzFacade = null;
  17.   private KhxxFacade khxxFacade = null;
  18.   public KhcpxzSelectOne() {
  19.     this.khcpxzFacade = new KhcpxzFacadeImpl();
  20.     this.khxxFacade = new KhxxFacadeImpl();
  21.   }
  22.   public ActionForward perform(ActionMapping actionMapping,
  23.                                ActionForm actionForm,
  24.                                HttpServletRequest servletRequest,
  25.                                HttpServletResponse servletResponse) {
  26.     KhcpxzForm khcpxzForm = (KhcpxzForm) actionForm;
  27.     servletRequest.setAttribute("list", this.khxxFacade.khxxSelect());
  28.     khcpxzForm.setId(Integer.valueOf(servletRequest.getParameter("id")));
  29.     servletRequest.setAttribute("Form",
  30.                                 this.khcpxzFacade.cpxzSelectOne(khcpxzForm));
  31.     if (servletRequest.getParameter("method") == null) {
  32.       return actionMapping.findForward("khcpxzSelectContent");
  33.     }
  34.     else {
  35.           return actionMapping.findForward("khcpxzSelectUpdate");
  36.         }}
  37.   }