📄 trainingaction.java
字号:
package org.better.hr.web.action;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.better.hr.biz.HumanFileBiz;
import org.better.hr.biz.TrainingBiz;
import org.better.hr.entity.HumanFile;
import org.better.hr.exception.HrException;
import org.better.hr.web.form.TrainingForm;
public class TrainingAction extends BasicAction {
private TrainingBiz trainingBiz; //业务操作对象
private HumanFileBiz humanfileBiz;
public HumanFileBiz getHumanfileBiz() {
return humanfileBiz;
}
public void setHumanfileBiz(HumanFileBiz humanfileBiz) {
this.humanfileBiz = humanfileBiz;
}
public TrainingBiz getTrainingBiz() {
return trainingBiz;
}
public void setTrainingBiz(TrainingBiz trainingBiz) {
this.trainingBiz = trainingBiz;
}
/**
* 跳转到新增页面
* @param mapping
* @param form
* @param request
* @param response
* @return
*/
public ActionForward toAdd(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws HrException
{
TrainingForm myForm = (TrainingForm)form;
return mapping.findForward("add");
}
/**
* 执行新增
* @param mapping
* @param form
* @param request
* @param response
* @return
*/
public ActionForward doAdd(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws HrException
{
TrainingForm myForm = (TrainingForm)form;
return mapping.findForward("");
}
/**
* 跳转到更新的页面
* @param mapping
* @param form
* @param request
* @param response
* @return
*/
public ActionForward toEdit(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws HrException
{
TrainingForm myForm = (TrainingForm) form;
return mapping.findForward("");
}
/**
* 执行更新
*Training* @param form
* @param request
* @param response
* @return
*/
public ActionForward doEdit(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws HrException
{
TrainingForm myForm = (TrainingForm) form;
return mapping.findForward("");
}
/**
* 跳转到删除页面
* @param mapping
* @param form
* @param request
* @param response
* @return
*/
public ActionForward toDelete(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws HrException
{
TrainingForm myForm = (TrainingForm) form;
return mapping.findForward("");
}
/**
* 执行删除
* @Training@param form
* @param request
* @param response
* @return
*/
public ActionForward doDelete(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws HrException
{
TrainingForm myForm = (TrainingForm) form;
return mapping.findForward("");
}
/**
* 显示数据所有列表
* @param mapping
* @param form
* @param request
* @param messages
* @return
*/
public ActionForward list(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response)
throws HrException
{
HumanFile item = new HumanFile();
item.setCheckStatus(Short.valueOf("1")); //经过复核
item.setHumanFileStatus(Byte.valueOf("1")); //未被删除
List list = this.getHumanfileBiz().list(item);
request.setAttribute("list", list);
return mapping.findForward("register_list");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -