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

📄 sysjobinfoaction.java

📁 仿招聘网站 SSH框架 ajax功能
💻 JAVA
字号:
/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package com.chinahr.web.struts.action;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.actions.DispatchAction;

import com.chinahr.biz.PageBeanBiz;
import com.chinahr.biz.SysJobInfoBiz;
import com.chinahr.pojo.SysJobInfo;
import com.chinahr.util.PageBean;

/** 
 * MyEclipse Struts
 * Creation date: 11-16-2008
 * 
 * XDoclet definition:
 * @struts.action parameter="oper" validate="true"
 * @struts.action-forward name="suc" path="/admin/job/SysJobInfo.jsp"
 */
public class SysJobInfoAction extends DispatchAction {
	/*
	 * Generated Methods
	 */

	/** 
	 * Method execute
	 * @param mapping
	 * @param form
	 * @param request
	 * @param response
	 * @return ActionForward
	 */
	PageBeanBiz pagebiz;
	PageBean bean;
	SysJobInfoBiz jobInfoBiz;
	public ActionForward doselect(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		HttpSession session=request.getSession(); 
		if(session.getAttribute("pagebean")!=null)
		{
			bean=(PageBean)session.getAttribute("pagebean");
			if(bean.getQueryString().equals("from SysJobInfo sort"))
			{
				bean.setPageState(false);
			}else{
				bean.setPageState(true);
			}
		}
		bean.setQueryString("from SysJobInfo sort");
		List list=pagebiz.GetPageResult(bean,true).getPgetResult();
		session.setAttribute("sort",list );
		session.setAttribute("pagebean", bean);
		return mapping.findForward("suc");
	}
	
	public ActionForward doupdate(ActionMapping mapping,ActionForm form,
			HttpServletRequest request,HttpServletResponse response) throws IOException{ 
		String Id=request.getParameter("Id");
		String st=request.getParameter("st");
		SysJobInfo jobinfo=new SysJobInfo();
		jobinfo.setJobId(new Integer(Id));
		jobinfo=jobInfoBiz.GetJobInfoById(jobinfo);
		if(jobinfo!=null)
		{
			jobinfo.setJobState(new Integer(st));
			jobInfoBiz.UpdateaJobInfo(jobinfo);
			PrintWriter out= response.getWriter();
			if(st.equals("0"))
			{
				out.print("<input type='button' value='发布' onclick=\"updateState('"+Id+"','1')\">");
			}else{
				out.print("<input type='button' value='禁用' onclick=\"updateState('"+Id+"','0')\">");
			}
			out.flush();
			out.close();	
		}	
		return null;
	}
	
	public void setPagebiz(PageBeanBiz pagebiz) {
		this.pagebiz = pagebiz;
	}
	public void setBean(PageBean bean) {
		this.bean = bean;
	}

	public void setJobInfoBiz(SysJobInfoBiz jobInfoBiz) {
		this.jobInfoBiz = jobInfoBiz;
	}
	
	
}

⌨️ 快捷键说明

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