LxrxxInsert.java
上传用户:quasar007
上传日期:2022-08-11
资源大小:4067k
文件大小:2k
- package com.webtier.clientlxrxxAction;
- import org.apache.struts.action.ActionMapping;
- import org.apache.struts.action.ActionForm;
- import javax.servlet.http.HttpServletRequest;
- import javax.servlet.http.HttpServletResponse;
- import org.apache.struts.action.ActionForward;
- import com.domain.LxrxxForm;
- import org.apache.struts.action.Action;
- import com.service.LxrxxFacade;
- import com.service.LxrxxFacadeImpl;
- import com.tool.Chinese;
- //插入操作
- public class LxrxxInsert
- extends Action {
- private LxrxxFacade facade = null;
- public LxrxxInsert() {
- this.facade = new LxrxxFacadeImpl();
- }
- public ActionForward perform(ActionMapping actionMapping,
- ActionForm actionForm,
- HttpServletRequest servletRequest,
- HttpServletResponse servletResponse) {
- LxrxxForm lxrxxForm = (LxrxxForm) actionForm;
- Chinese chinese =new Chinese();
- String year = servletRequest.getParameter("year");
- String month = servletRequest.getParameter("month");
- String date = servletRequest.getParameter("date");
- String ymd = year + "年" + month + "月" + date + "日";
- lxrxxForm.setLxrxx_id(chinese.str(servletRequest.getParameter("id")));
- lxrxxForm.setLxrxx_qymc(chinese.str(servletRequest.getParameter("mc")));
- lxrxxForm.setLxrxx_xm(chinese.str(servletRequest.getParameter("xm")));
- lxrxxForm.setLxrxx_xb(chinese.str(servletRequest.getParameter("sex")));
- lxrxxForm.setLxrxx_csny(ymd);
- lxrxxForm.setLxrxx_nl(chinese.str(servletRequest.getParameter("age")));
- lxrxxForm.setLxrxx_zw(chinese.str(servletRequest.getParameter("profession")));
- lxrxxForm.setLxrxx_bgdh(chinese.str(servletRequest.getParameter("tel")));
- lxrxxForm.setLxrxx_Email(chinese.str(servletRequest.getParameter("email")));
- lxrxxForm.setLxrxx_sj(chinese.str(servletRequest.getParameter("sj")));
- lxrxxForm.setLxrxx_grjj(chinese.str(servletRequest.getParameter("grjj")));
- lxrxxForm.setLxrxx_djrq(chinese.str(servletRequest.getParameter("djrq")));
- lxrxxForm.setLxrxx_xxdjr(chinese.str(servletRequest.getParameter("manager")));
- lxrxxForm.setLxrxx_bs(chinese.str(servletRequest.getParameter("kh")));
- lxrxxForm.setLxrxx_bz(chinese.str(servletRequest.getParameter("bz")));
- this.facade.insert(lxrxxForm);
- return actionMapping.findForward("lxrxxInsert");
- }
- }