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

📄 saveeduexpinfoaction.java

📁 一个oa系统
💻 JAVA
字号:
/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package com.oa.deptoffice.action;

import java.io.IOException;
import java.io.PrintWriter;

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.oa.db.Eduexpinfo;
import com.oa.db.EduexpinfoDAO;

/** 
 * MyEclipse Struts
 * Creation date: 08-24-2007
 * 
 * XDoclet definition:
 * @struts.action validate="true"
 * @struts.action-forward name="currentpage" path="/deptoffice/nextaddstaffbasicinfo.jsp"
 */
public class SaveeduexpinfoAction extends Action {
	/*
	 * Generated Methods
	 */
	EduexpinfoDAO dao;
	/** 
	 * Method execute
	 * @param mapping
	 * @param form
	 * @param request
	 * @param response
	 * @return ActionForward
	 */
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		// TODO Auto-generated method stub
		int staffbasicinfoid = Integer.parseInt(request.getParameter("staffbasicinfoid"));
		String next = request.getParameter("next");
		String fromyear = request.getParameter("fromyear");
		String frommonth = request.getParameter("frommonth");
		String toyear = request.getParameter("toyear");
		String tomonth = request.getParameter("tomonth");
		String eduoffice = request.getParameter("eduoffice");
		String eduprofession = request.getParameter("eduprofession");
		String prover = request.getParameter("prover");
		String provertelephone = request.getParameter("provertelephone");
		Eduexpinfo vo = new Eduexpinfo();
		vo.setStaffbasicinfoid(staffbasicinfoid);
		vo.setFromyear(fromyear);
		vo.setFrommonth(frommonth);
		vo.setToyear(toyear);
		vo.setTomonth(tomonth);
		vo.setEduoffice(eduoffice);
		vo.setEduprofession(eduprofession);
		vo.setProver(prover);
		vo.setProvertelephone(provertelephone);		
		dao.Save(vo);
		response.setCharacterEncoding("gbk");
	    PrintWriter out = null;
		try {
			out = response.getWriter();
		} catch (IOException e) {
			// TODO 自动生成 catch 块
			e.printStackTrace();
		}	
		out.print("<script>");
		if(next!=null&&next.equals("1")){
		    out.print("document.location.href = 'eduexplist.do?next=1&id="+staffbasicinfoid+"';");	
		}
		if(next!=null&&next.equals("2")){
		    out.print("document.location.href = 'eduexplist.do?next=2&id="+staffbasicinfoid+"';");	
		}
//		out.print("window.opener.location.href = 'deptoffice/biao.jsp?id="+staffbasicinfoid+"';");
		out.print("</script>");
		out.flush();
		return null;
	}
	public EduexpinfoDAO getDao() {
		return dao;
	}
	public void setDao(EduexpinfoDAO dao) {
		this.dao = dao;
	}
}

⌨️ 快捷键说明

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