📄 savemodifyworkexpinfoaction.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 javax.servlet.http.HttpSession;
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.Workexpinfo;
import com.oa.db.WorkexpinfoDAO;
/**
* MyEclipse Struts
* Creation date: 08-29-2007
*
* XDoclet definition:
* @struts.action validate="true"
*/
public class SavemodifyworkexpinfoAction extends Action {
/*
* Generated Methods
*/
WorkexpinfoDAO wdao;
/**
* 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
response.setCharacterEncoding("gbk");
PrintWriter out=null;
try {
out = response.getWriter();
} catch (IOException e) {
// TODO 自动生成 catch 块
e.printStackTrace();
}
HttpSession session = request.getSession();
String username=(String)session.getAttribute("username");
String staffbasicinfoid = request.getParameter("staffbasicinfoid");
String id = request.getParameter("id");
String fromyear = request.getParameter("fromyear");
String frommonth = request.getParameter("frommonth");
String toyear = request.getParameter("toyear");
String tomonth = request.getParameter("tomonth");
String workoffice = request.getParameter("workoffice");
String workpost = request.getParameter("workpost");
String prover = request.getParameter("prover");
String provertelephone = request.getParameter("provertelephone");
Workexpinfo vo = new Workexpinfo();
vo.setId(Integer.parseInt(id));
vo.setStaffbasicinfoid(Integer.parseInt(staffbasicinfoid));
vo.setFromyear(fromyear);
vo.setFrommonth(frommonth);
vo.setToyear(toyear);
vo.setTomonth(tomonth);
vo.setWorkoffice(workoffice);
vo.setWorkpost(workpost);
vo.setProver(prover);
vo.setProvertelephone(provertelephone);
if(username!=null){
wdao.UpdateWorkexpinfo(vo);
out.print("<script>");
out.print("window.opener.location.href = 'eduexplist.do?id="+staffbasicinfoid+"';");
out.print("window.close();");
out.print("window.opener.opener.location.reload();");
out.print("</script>");
out.flush();
}else{
out.print("<script>alert('您的操作超时,请重新登录!');");
out.print("window.open('login.jsp','_self');");
out.print("</script>");
out.flush();
}
return null;
}
public WorkexpinfoDAO getWdao() {
return wdao;
}
public void setWdao(WorkexpinfoDAO wdao) {
this.wdao = wdao;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -