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

企业管理

开发平台:

Java

  1. package com.webtier.clientlxrxxAction;
  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.LxrxxForm;
  8. import org.apache.struts.action.Action;
  9. import com.service.LxrxxFacade;
  10. import com.service.LxrxxFacadeImpl;
  11. import com.tool.Chinese;
  12. //插入操作
  13. public class LxrxxInsert
  14.     extends Action {
  15.   private LxrxxFacade facade = null;
  16.   public LxrxxInsert() {
  17.     this.facade = new LxrxxFacadeImpl();
  18.   }
  19.   public ActionForward perform(ActionMapping actionMapping,
  20.                                ActionForm actionForm,
  21.                                HttpServletRequest servletRequest,
  22.                                HttpServletResponse servletResponse) {
  23.     LxrxxForm lxrxxForm = (LxrxxForm) actionForm;
  24.     Chinese chinese =new Chinese();
  25.     String year = servletRequest.getParameter("year");
  26.     String month = servletRequest.getParameter("month");
  27.     String date = servletRequest.getParameter("date");
  28.     String ymd =  year + "年" + month + "月" + date + "日";
  29.     lxrxxForm.setLxrxx_id(chinese.str(servletRequest.getParameter("id")));
  30.     lxrxxForm.setLxrxx_qymc(chinese.str(servletRequest.getParameter("mc")));
  31.     lxrxxForm.setLxrxx_xm(chinese.str(servletRequest.getParameter("xm")));
  32.     lxrxxForm.setLxrxx_xb(chinese.str(servletRequest.getParameter("sex")));
  33.     lxrxxForm.setLxrxx_csny(ymd);
  34.     lxrxxForm.setLxrxx_nl(chinese.str(servletRequest.getParameter("age")));
  35.     lxrxxForm.setLxrxx_zw(chinese.str(servletRequest.getParameter("profession")));
  36.     lxrxxForm.setLxrxx_bgdh(chinese.str(servletRequest.getParameter("tel")));
  37.     lxrxxForm.setLxrxx_Email(chinese.str(servletRequest.getParameter("email")));
  38.     lxrxxForm.setLxrxx_sj(chinese.str(servletRequest.getParameter("sj")));
  39.     lxrxxForm.setLxrxx_grjj(chinese.str(servletRequest.getParameter("grjj")));
  40.     lxrxxForm.setLxrxx_djrq(chinese.str(servletRequest.getParameter("djrq")));
  41.     lxrxxForm.setLxrxx_xxdjr(chinese.str(servletRequest.getParameter("manager")));
  42.     lxrxxForm.setLxrxx_bs(chinese.str(servletRequest.getParameter("kh")));
  43.     lxrxxForm.setLxrxx_bz(chinese.str(servletRequest.getParameter("bz")));
  44.     this.facade.insert(lxrxxForm);
  45.     return actionMapping.findForward("lxrxxInsert");
  46.   }
  47. }