studentaction.java

来自「基于WEB的学生选课系统」· Java 代码 · 共 36 行

JAVA
36
字号
package com.student.action;import org.apache.struts.action.*;import javax.servlet.http.*;import com.student.actionform.StudentActionForm;import com.student.logic.StudentLogic;import com.student.vo.BaseInfo;public class StudentAction extends Action {  public ActionForward perform(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) {    /**@todo: complete the business logic here, this is just a skeleton.*/        StudentActionForm form = (StudentActionForm) actionForm;        StudentLogic logic = new StudentLogic(form);        if(form.getOperation().equals("delete"))        {          logic.deleteStudent();          form.setOperation("display");        }        if(form.getOperation().equals("save"))        {          logic.saveStudent();          form.setOperation("display");        }        if(form.getOperation().equals("add"))        {           logic.addStudent();           form.setOperation("display");           logic.closeDAO();           return actionMapping.findForward("student");        }        logic.getStudents();        logic.closeDAO();        return actionMapping.findForward("student");  }}

⌨️ 快捷键说明

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