⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 addygxinxiaction.java

📁 gensou.rar为某渔具厂的一个简单ERP系统。为比较基础的工程
💻 JAVA
字号:
/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package com.gensou.struts.yuangong.xinxi.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.gensou.dao.bumen.xinxi.BumenxinxiDao;
import com.gensou.dao.yuangong.xinxi.YuangongxinxiDao;
import com.gensou.logic.bumen.xinxi.AddbmxinxiService;
import com.gensou.logic.yuangong.xinxi.AddygxinxiService;
import com.gensou.struts.bumen.xinxi.form.AddbmxinxiForm;
import com.gensou.struts.yuangong.xinxi.form.AddygxinxiForm;

/** 
 * MyEclipse Struts
 * Creation date: 01-16-2007
 * 
 * XDoclet definition:
 * @struts.action path="/addygxinxi" name="addygxinxiForm" scope="request" validate="true"
 */
public class AddygxinxiAction extends Action {
	/*
	 * Generated Methods
	 */

	/** 
	 * Method execute
	 * @param mapping
	 * @param form
	 * @param request
	 * @param response
	 * @return ActionForward
	 */
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		AddygxinxiForm addygxinxiForm = (AddygxinxiForm) form;// TODO Auto-generated method stub
		String str;
		AddygxinxiService addygxinxiservice=new AddygxinxiService(addygxinxiForm);
      	addygxinxiservice.setYuangongid(addygxinxiForm.getYuangongid());//员工号
		addygxinxiservice.setYuangongname(addygxinxiForm.getYuangongname());//员工名
		addygxinxiservice.setYuangongsex(addygxinxiForm.getYuangongsex());//员工性别
		addygxinxiservice.setYuangongbirth(addygxinxiForm.getYuangongbirth());//年龄
		addygxinxiservice.setYuangongaddress(addygxinxiForm.getYuangongaddress());//员工住址
		
		addygxinxiservice.setYuangongtel1(addygxinxiForm.getYuangongtel1());//家庭电话
		addygxinxiservice.setYuangongtel2(addygxinxiForm.getYuangongtel2());//员工手机		
		addygxinxiservice.setBeizhu(addygxinxiForm.getBeizhu());
		addygxinxiservice.setZhuangtai(addygxinxiForm.getZhuangtai());
		YuangongxinxiDao yuangongxinxiDao=new YuangongxinxiDao();
		boolean bool=yuangongxinxiDao.addygxinxi(addygxinxiservice);
		if(bool==true){
			str="记录添加成功";
			request.setAttribute("str",str);
			return mapping.findForward("addemployee");
		}else{
		  str="该信息已存在";	
		  request.setAttribute("str",str);
		  return mapping.findForward("addemployee");
		}
	
     }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -