choosejyxxaction.java

来自「基于JAVA的学生就业信息网 实现对信息浏览 检索 审核 修改和删除」· Java 代码 · 共 86 行

JAVA
86
字号
/*
 * Created on 2006-7-27
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package org.ug.sztz.webview.structs.actions.student;

import java.util.List;
import java.util.Vector;

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.ug.sztz.domain.oa.StudentBaseInfo;
import org.ug.sztz.domain.oa.StudentJYInfo;
import org.ug.sztz.domain.assistant.StringConvertor;
import org.ug.sztz.domain.ListFactory.*;
/**
 * @author Skywalker
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class ChooseJyxxAction extends BaseAction {

	/* (non-Javadoc)
	 * @see org.apache.struts.action.Action#execute(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
	 */
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) throws Exception {
		// TODO Auto-generated method stub
		String xh = ((StudentBaseInfo)request.getSession().getAttribute("baseinfo")).getXh();
		String type = request.getParameter("type");
		String byqx = StringConvertor.getStr(request.getParameter("byqx"));
		String dwxz = StringConvertor.getStr(request.getParameter("dwxz"));
		String jyxs = StringConvertor.getStr(request.getParameter("jyxs"));
		
		List dwszdlist = new ListFactory(this.getServlet().getServletConfig(),"dwszd").getList();
		List lsgzqdlist = new ListFactory(this.getServlet().getServletConfig(),"lsgzqd").getList();
		List dwjjlxlist = new ListFactory(this.getServlet().getServletConfig(),"dwjjlx").getList();
		List dwxzlist = new ListFactory(this.getServlet().getServletConfig(),"dwxz").getList();
		StudentJYInfo info = this.stuJYDao.getStudentJYInfoByXh(xh);
		
		request.setAttribute("dwszdlist",dwszdlist);
		request.setAttribute("lsgzqdlist",lsgzqdlist);
		request.setAttribute("dwjjlxlist",dwjjlxlist);
		request.setAttribute("dwxzlist",dwxzlist);
		request.setAttribute("byqx",byqx);
		request.setAttribute("dwxz",dwxz);
		request.setAttribute("jyxs",jyxs);
		if (info.getDwszd() != null)
			info.setDwszd(info.getDwszd().trim());
		if (info.getLsgzqd() != null)
			info.setLsgzqd(info.getLsgzqd().trim());
		if (info.getDwxz() != null)
			info.setDwxz(info.getDwxz().trim());
		if (info.getDwjjlx() != null)
			info.setDwjjlx(info.getDwjjlx().trim());
		if (info.getJyxs() != null)
			info.setJyxs(info.getJyxs().trim());
		if (info.getLcnr() != null)
			info.setLcnr(info.getLcnr().trim());
		if (info.getByqx() != null)
			info.setByqx(info.getByqx().trim());
		request.setAttribute("jyinfo",info);
		if(type.equals("1"))
			return mapping.findForward("type1");
		else if(type.equals("2"))
			return mapping.findForward("type2");
		else if(type.equals("3"))
			return mapping.findForward("type3");
		else if(type.equals("4"))
			return mapping.findForward("type4");
		else if(type.equals("5"))
			return mapping.findForward("type5");
		else if(type.equals("6"))
			return mapping.findForward("type6");
		else
			return mapping.findForward("type7");
	}
}

⌨️ 快捷键说明

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