资源简介
基于SSH开发的学生选课系统,完整功能,适合初学者研究学习。
代码片段和文件信息
package action;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import models.Admin;
import models.Course;
import models.Course_teacher;
import models.Student;
import models.Teacher;
import org.apache.struts2.ServletActionContext;
import service.IAdminService;
import com.opensymphony.xwork2.ActionContext;
public class AdminAction {
private IAdminService adminservice;
private HttpServletRequest request;
private Teacher newteacher;
public Teacher getNewteacher() {
return newteacher;
}
public void setNewteacher(Teacher newteacher) {
this.newteacher = newteacher;
}
private Admin newadmin;
private Student newstudent;
private Course newcourse;
public Course getNewcourse() {
return newcourse;
}
public void setNewcourse(Course newcourse) {
this.newcourse = newcourse;
}
public Student getNewstudent() {
return newstudent;
}
public void setNewstudent(Student newstudent) {
this.newstudent = newstudent;
}
public Admin getNewadmin() {
return newadmin;
}
public void setNewadmin(Admin newadmin) {
this.newadmin = newadmin;
}
public IAdminService getAdminservice() {
return adminservice;
}
public void setAdminservice(IAdminService adminservice) {
this.adminservice = adminservice;
}
public String execute() {
ActionContext.getContext().getSession().put(“admin“ newadmin);
if(adminservice.updateAdminInfo(newadmin)){
return “success“;
}
else
return “false“;
}
public String showallstuInfo(){
List allstudent=adminservice.getallstuInfo();
request=ServletActionContext.getRequest();
request.setAttribute(“allstudent“ allstudent);
return “success“;
}
public String admindeletestu(){
String stuid=ServletActionContext.getRequest().getParameter(“stuid“);
Student deletestudent=new Student();
deletestudent.setStuId(Integer.parseInt(stuid));
if(adminservice.admindeletestu(deletestudent)){
List allstudent=adminservice.getallstuInfo();
request=ServletActionContext.getRequest();
request.setAttribute(“allstudent“ allstudent);
return “success“;
}
else
return “false“;
}
public String admingetSelectedStu(){
String stuid=ServletActionContext.getRequest().getParameter(“stuid“);
int realstuid=Integer.parseInt(stuid);
Student selectedstudent=adminservice.admingetSelectedStu(realstuid);
if(selectedstudent==null)
return “fail“;
else{
request=ServletActionContext.getRequest();
request.setAttribute(“selectedstudent“ selectedstudent);
return “success“;
}
}
public String adminEditStu(){
if(adminservice.adminEditStu(newstudent)){
List allstudent=adminservice.getallstuInfo();
request=ServletActionContext.getRequest();
request.setAttribute(“allstudent“ allstudent);
return “success“;
}
else
return “fail“;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2013-12-20 22:39 Manage\
文件 1586 2012-12-27 23:20 Manage\.classpath
文件 622 2012-12-27 23:20 Manage\.myhibernatedata
文件 300 2013-12-23 20:47 Manage\.myme
文件 240 2012-12-27 23:20 Manage\.mystrutsdata
文件 2245 2012-12-27 23:20 Manage\.project
目录 0 2013-12-20 22:39 Manage\.settings\
文件 493 2012-12-27 23:20 Manage\.settings\.jsdtscope
目录 0 2013-12-20 22:39 Manage\.settings\.svn\
文件 974 2013-12-20 22:39 Manage\.settings\.svn\all-wcprops
文件 1234 2013-12-20 22:39 Manage\.settings\.svn\entries
文件 2 2012-12-27 23:20 Manage\.settings\.svn\format
目录 0 2013-12-20 22:39 Manage\.settings\.svn\prop-ba
文件 39 2013-12-20 22:39 Manage\.settings\.svn\prop-ba
文件 39 2013-12-20 22:39 Manage\.settings\.svn\prop-ba
目录 0 2013-12-21 23:33 Manage\.settings\.svn\props\
目录 0 2013-12-20 22:39 Manage\.settings\.svn\text-ba
文件 493 2013-12-20 22:39 Manage\.settings\.svn\text-ba
文件 395 2013-12-20 22:39 Manage\.settings\.svn\text-ba
文件 465 2013-12-20 22:39 Manage\.settings\.svn\text-ba
文件 252 2013-12-20 22:39 Manage\.settings\.svn\text-ba
文件 49 2013-12-20 22:39 Manage\.settings\.svn\text-ba
文件 6 2013-12-20 22:39 Manage\.settings\.svn\text-ba
目录 0 2013-12-20 22:39 Manage\.settings\.svn\tmp\
目录 0 2013-12-21 23:33 Manage\.settings\.svn\tmp\prop-ba
目录 0 2013-12-21 23:33 Manage\.settings\.svn\tmp\props\
目录 0 2013-12-21 23:33 Manage\.settings\.svn\tmp\text-ba
文件 395 2012-12-27 23:20 Manage\.settings\org.eclipse.jdt.core.prefs
文件 465 2012-12-27 23:20 Manage\.settings\org.eclipse.wst.common.component
文件 252 2012-12-27 23:20 Manage\.settings\org.eclipse.wst.common.project.facet.core.xm
文件 49 2012-12-27 23:20 Manage\.settings\org.eclipse.wst.jsdt.ui.superType.container
............此处省略729个文件信息
相关资源
- openSSH安装包
- 基于SpringBoot+vue的前后端分离工资绩效
- SSHSecureShellClient-3.2.8.zip
- SSH Secure Shell免安装版
- ssh实现的酒店预订系统.rar
- webservice+jdbc
- 基于ssh的增删改查小型erp
- sshshell for mac
- struts2+spring2.5+hibernate3.2中文开发手册
- 达内电信计费系统完整代码
- windows 下openssh服务安装包
- SSH框架——学生选课系统
- libssh2_include&&lib
- libssh2_lib [vs2013 x 86]
- struts2.0+spring2.5+hibernate3.2帮助文档ss
- SSH框架开发的简单留言板系统
- ssh的物流系统 方便 易懂
- 升级OpenSSH_7.4p1完整源码包
- openssh-7.9p1
- 基于ssh框架的网上订餐系统的设计与
- SSH架构实现的班级管理系统源码
- 基于SSH的CRM系统的研究和设计
- 基于ssh框架下的仓库管理系统
- 2018年最新版PCHunter+processhacker系统查黑
- linux升级openssh到7.8p版本包
- 尚硅谷redis笔记(.mmap)
- SSH投票管理平台项目源码
- 毕业设计-基于SSH图书管理系统
- SSH Secure File Transfer Client
- Grasshopper汉化包
评论
共有 条评论