资源简介

百度文库 牛牧老师 最完整的学籍管理系统 STM_SSH_V4

资源截图

代码片段和文件信息

package cn.tianyi.lijin.action;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;


import cn.tianyi.lijin.service.DepartmentService;
import cn.tianyi.lijin.util.Pager;
import cn.tianyi.lijin.vo.Department;

import com.opensymphony.xwork2.ModelDriven;

@Component(“departmentAction“)
@Scope(“prototype“)
public class DepartmentAction extends SuperAction implements ModelDriven{

/**
 * 
 */
private static final long serialVersionUID = 1L;
private Department dept ;
private int menuIndex;
private DepartmentService departmentServiceImpl;
private String deptname;


public DepartmentService getDepartmentServiceImpl() {
return departmentServiceImpl;
}
@Resource
public void setDepartmentServiceImpl(DepartmentService departmentServiceImpl) {
this.departmentServiceImpl = departmentServiceImpl;
}
public int getMenuIndex() {
return menuIndex;
}
public void setMenuIndex(int menuIndex) {
this.menuIndex = menuIndex;
}

public Department getModel() {
// TODO Auto-generated method stub
return dept;
}

//显示所有的院系信息
public String list(){

List  dept= departmentServiceImpl.getDepatment();
Pager pager;
if(request.getSession().getAttribute(“pager“)==null){
pager = new Pager();
request.getSession().setAttribute(“pager“pager);
}
pager  = (Pager)request.getSession().getAttribute(“pager“);
pager.setBigList(dept);
if(request.getParameter(“PageIndex“)==null|| request.getParameter(“PageIndex“).equals(““)){
pager.setCurentPageIndex(1);
}else{

pager.setCurentPageIndex(Integer.parseInt(request.getParameter(“PageIndex“)));
}
request.getSession().setAttribute(“pager“ pager);
return SUCCESS;
}

    //添加新的院系信息
public String add(){
Department d = new Department();
d.setDeptid(departmentServiceImpl.getNewDeptId());
d.setDeptname(deptname);
System.out.println(“---------“+d.getDeptid()+“---------“+d.getDeptname());
System.out.println(“---------“+d);
if(departmentServiceImpl.saveDepartment(d)){
return “add_success“;
}else {
return INPUT;
}

}
public String getDeptname() {
return deptname;
}
public void setDeptname(String deptname) {
this.deptname = deptname;
}

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2013-10-21 13:18  STM_SSH_V4\
     文件         572  2013-10-20 17:25  STM_SSH_V4\.classpath
     文件         303  2013-10-20 17:24  STM_SSH_V4\.mymetadata
     文件        1753  2013-10-20 17:23  STM_SSH_V4\.project
     目录           0  2013-10-21 13:18  STM_SSH_V4\.settings\
     文件         500  2013-10-20 13:10  STM_SSH_V4\.settings\.jsdtscope
     文件        1040  2013-10-20 17:24  STM_SSH_V4\.settings\com.genuitec.eclipse.j2eedt.core.prefs
     文件         120  2013-10-20 13:20  STM_SSH_V4\.settings\com.genuitec.jboss.ide.eclipse.xdoclet.run.prefs
     文件         395  2013-10-20 13:10  STM_SSH_V4\.settings\org.eclipse.jdt.core.prefs
     文件         543  2013-10-20 17:24  STM_SSH_V4\.settings\org.eclipse.wst.common.component
     文件         252  2013-10-20 13:10  STM_SSH_V4\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件          49  2013-10-20 13:10  STM_SSH_V4\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2013-10-20 13:10  STM_SSH_V4\.settings\org.eclipse.wst.jsdt.ui.superType.name
     目录           0  2013-10-20 19:52  STM_SSH_V4\bin\
     目录           0  2013-10-20 18:30  STM_SSH_V4\classes\
     目录           0  2013-10-20 19:54  STM_SSH_V4\dist\
     目录           0  2013-10-21 13:18  STM_SSH_V4\src\
     文件        3293  2013-10-18 21:10  STM_SSH_V4\src\applicationContext.xml
     目录           0  2013-10-21 13:18  STM_SSH_V4\src\cn\
     目录           0  2013-10-21 13:18  STM_SSH_V4\src\cn\tianyi\
     目录           0  2013-10-21 13:18  STM_SSH_V4\src\cn\tianyi\lijin\
     目录           0  2013-10-21 13:18  STM_SSH_V4\src\cn\tianyi\lijin\action\
     文件        2455  2013-10-20 11:51  STM_SSH_V4\src\cn\tianyi\lijin\action\DepartmentAction.java
     文件        3612  2013-10-20 11:59  STM_SSH_V4\src\cn\tianyi\lijin\action\MajorAction.java
     文件        6802  2013-10-20 16:19  STM_SSH_V4\src\cn\tianyi\lijin\action\StudentsAction.java
     文件        1138  2013-10-05 22:46  STM_SSH_V4\src\cn\tianyi\lijin\action\SuperAction.java
     文件        2776  2013-10-15 13:11  STM_SSH_V4\src\cn\tianyi\lijin\action\UserAction.java
     文件        1196  2013-10-20 11:57  STM_SSH_V4\src\cn\tianyi\lijin\action\WelcomeAction.java
     目录           0  2013-10-21 13:18  STM_SSH_V4\src\cn\tianyi\lijin\aop\
     文件        1834  2013-10-20 14:39  STM_SSH_V4\src\cn\tianyi\lijin\aop\LoggerAspect.java
     目录           0  2013-10-21 13:18  STM_SSH_V4\src\cn\tianyi\lijin\dao\
............此处省略268个文件信息

评论

共有 条评论