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

📄 studentscoreaction.java

📁 are are are are are are are are are are are are
💻 JAVA
字号:
/* * StudentScoreAction.java * * Created on 2006年6月9日, 上午1:59 */package enova.web.struts.action;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;import org.apache.struts.action.Action;import org.apache.struts.action.ActionForm;import org.apache.struts.action.ActionMapping;import org.apache.struts.action.ActionForward;import enova.service.*;import enova.pojo.*;import enova.util.Const;import enova.web.struts.form.*;/** * * @author vlinux * @version */public class StudentScoreAction extends Action {        private ScoreService ss = (ScoreService)ServiceFactory.makeService("ScoreService");        public ActionForward execute(ActionMapping mapping, ActionForm  form,            HttpServletRequest request, HttpServletResponse response)            throws Exception {        StudentScoreForm ssf = (StudentScoreForm)form;        Student student = (Student)request.getSession().getAttribute(Const.LOGIN_STUDENT);        if( student==null )            return mapping.findForward(Const.ACCESS_DENY);        String number = student.getNumber();        int year = student.getEnrollYear().intValue() + ssf.getYear().intValue();        try{            if( ssf.getYear()==null && ssf.getTerm()==null )                request.setAttribute("scores",ss.getByNumber(number));            else                request.setAttribute("scores",ss.getByNumberAndYearAndTerm(number,new Integer(year),ssf.getTerm()));        }catch(StoreException se){            request.setAttribute(Const.MESSAGES,"数据库出错");            return mapping.findForward(Const.STORE_EXCEPTION);        }        return mapping.findForward(Const.SUCCESS);    }}

⌨️ 快捷键说明

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