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

📄 addstaffaction.java

📁 java阿里巴巴代码
💻 JAVA
字号:
// Created by Xslt generator for Eclipse.
// XSL :  not found (java.io.FileNotFoundException:  (Bad file descriptor))
// Default XSL used : easystruts.jar$org.easystruts.xslgen.JavaClass.xsl

package com.ahbay.struts.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.ahbay.struts.form.StaffinfoForm;
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.ahbay.UserMgr.*;
import com.ahbay.commenMgr.commMethodMgr;
import javax.servlet.http.*; 

/** 
 * AddstaffAction.java created by EasyStruts - XsltGen.
 * http://easystruts.sf.net
 * created on 08-16-2006
 * 
 * XDoclet definition:
 * @struts:action validate="true"
 */
public class AddstaffAction extends Action
{
	// --------------------------------------------------------- Instance Variables
	// --------------------------------------------------------- Methods
	/** 
	 * Method execute
	 * @param ActionMapping mapping
	 * @param ActionForm form
	 * @param HttpServletRequest request
	 * @param HttpServletResponse response
	 * @return ActionForward
	 * @throws Exception
	 */
	public ActionForward execute(
		ActionMapping mapping,
		ActionForm form,
		HttpServletRequest request,
		HttpServletResponse response)
		throws Exception
	{
		StaffinfoForm staffform = (StaffinfoForm) form;
		StaffMgr staff =  new StaffMgr();
		HttpSession session = request.getSession(); 
		String staffId = (String) session.getAttribute("staffId");
		
		staff.setStaff_id(staffform.getStaff_id());
		staff.setDepart_id(staffform.getDepart_id());
		staff.setStaff_name(staffform.getStaff_name());
		staff.setPasswd(staffform.getPasswd());
		staff.setJob_info(staffform.getJob_info());
		staff.setManager_info(staffform.getManager_info());
		staff.setSex(staffform.getSex());
		staff.setEmail(staffform.getEmail());
		staff.setUser_pid(staffform.getUser_pid());
		staff.setSerial_number(staffform.getSerial_number());
		staff.setCust_id(staffform.getCust_id());
		staff.setDimission_tag("0");
		staff.setBirthday(staffform.getBirthday());
		staff.setStaff_group_id(staffform.getStaff_group_id());
		staff.setCust_hobyy(staffform.getCust_hobyy());
		staff.setRemark(staffform.getRemark());
		staff.setRsvalue1(staffform.getRsvalue1());
		staff.setRsvalue2(staffform.getRsvalue2());
		staff.setUpdate_time(staffform.getUpdate_time());
		staff.setUpdate_staff_id(staffId);
		staff.setUpdate_depart_id(staffform.getUpdate_depart_id());
		
		String result= staff.AddStaff();
		request.setAttribute("result",result);	
		request.setAttribute("order","26");
		return mapping.findForward("error"); 
	}
}

⌨️ 快捷键说明

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