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

📄 configmajoraction.java

📁 hr伯乐管理系统!非常适合java学员做学习参考用!是用集成框架开发的Struts+hrbernet+Spring 开发的
💻 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.ConfigMajorBiz;
import org.better.hr.biz.ConfigMajorKindBiz;
import org.better.hr.entity.ConfigMajorKind;
import org.better.hr.exception.HrException;
import org.better.hr.web.form.ConfigMajorForm;
import org.better.hr.web.form.ConfigMajorKindForm;


public class ConfigMajorAction extends BasicAction {
	
	private ConfigMajorBiz configmajorBiz;  //业务操作对象
	private ConfigMajorKindBiz configmajorkindBiz;

	public ConfigMajorKindBiz getConfigmajorkindBiz() {
		return configmajorkindBiz;
	}

	public void setConfigmajorkindBiz(ConfigMajorKindBiz configmajorkindBiz) {
		this.configmajorkindBiz = configmajorkindBiz;
	}

	public ConfigMajorBiz getConfigmajorBiz() {
		return configmajorBiz;
	}

	public void setConfigmajorBiz(ConfigMajorBiz configmajorBiz) {
		this.configmajorBiz = configmajorBiz;
	}

	/**
	 * 跳转到新增页面
	 * @param mapping
	 * @param form
	 * @param request
	 * @param response
	 * @return
	 */
	public ActionForward toAdd(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) throws HrException
	{
		List list = this.getConfigmajorkindBiz().list(null);
		request.setAttribute("list", list);
		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
	{
		
			return mapping.findForward("addsuccess");
		
	}
	
	/**
	 * 跳转到删除页面
	 * @param mapping
	 * @param form
	 * @param request
	 * @param response
	 * @return
	 */
	public ActionForward toDelete(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) throws HrException
	{

		return mapping.findForward("delete");
	}
	
	/**
	 * 执行删除
	 * @param mapping
	 * @param form
	 * @param request
	 * @param response
	 * @return
	 */
	public ActionForward doDelete(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) throws HrException
	{
		return mapping.findForward("delsuccess");
	}
	
	/**
	 * 显示数据所有列表
	 * @param mapping
	 * @param form
	 * @param request
	 * @param messages
	 * @return
	 */
	public ActionForward list(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response) 
								throws HrException
	{
		List list = this.getConfigmajorBiz().list(null);
		request.setAttribute("list", list);
		return mapping.findForward("list");
	}
		
}

⌨️ 快捷键说明

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