• 大小: 15.83MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-07-06
  • 语言: 其他
  • 标签:

资源简介

使用ssh框架实现的员工管理系统

资源截图

代码片段和文件信息

package cn.mani123.employee.action;

import java.util.List;

import javax.servlet.RequestDispatcher;

import org.springframework.http.HttpRequest;

import cn.mani123.employee.domani.Department;
import cn.mani123.employee.domani.PageBean;
import cn.mani123.employee.service.DepartmentService;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;

public class DepartmentAction extends ActionSupport implements ModelDriven{

/**
 * 
 */
private static final long serialVersionUID = 1L;
Department department = new Department();
@Override
public Department getModel() {
return department;
}
private Integer currPage = 1;
private DepartmentService departmentService;

public void setDepartmentService(DepartmentService departmentService) {
this.departmentService = departmentService;
}

public void setCurrPage(Integer currPage) {
this.currPage = currPage;
}

//分页显示
public String findAll(){
PageBean pageBean = departmentService.findByPage(currPage);
ActionContext.getContext().getValueStack().push(pageBean);//传到value栈中
return “findAll“;
}
//跳转到添加部门页面的方法
public String saveUI(){
return “saveUI“;
}

public String add(){
departmentService.add(department);
return “addSuccess“;
}

//action编辑返回页面的方法
public String edit(){
department = departmentService.findById(department.getDid());
return “editSuccess“;
}

//action中修改部门的方法
public String update(){
departmentService.update(department);
return “updateSuccess“;
}

//action中删除部门的方法
public String delete(){
department = departmentService.findById(department.getDid());
departmentService.delete(department);
return “deleteSuccess“;
}
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-04-24 16:40  ssh_employee\
     文件         598  2017-04-24 16:43  ssh_employee\.classpath
     目录           0  2017-04-24 16:40  ssh_employee\.myeclipse\
     文件         309  2017-04-24 16:40  ssh_employee\.mymetadata
     文件        1755  2017-04-24 17:21  ssh_employee\.project
     目录           0  2017-04-24 16:40  ssh_employee\.settings\
     文件         493  2017-04-24 16:40  ssh_employee\.settings\.jsdtscope
     文件         395  2017-04-24 16:40  ssh_employee\.settings\org.eclipse.jdt.core.prefs
     文件         474  2017-04-24 16:40  ssh_employee\.settings\org.eclipse.wst.common.component
     文件         252  2017-04-24 16:40  ssh_employee\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件          49  2017-04-24 16:40  ssh_employee\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2017-04-24 16:40  ssh_employee\.settings\org.eclipse.wst.jsdt.ui.superType.name
     目录           0  2017-05-12 17:23  ssh_employee\src\
     文件        3739  2017-05-01 01:33  ssh_employee\src\applicationContext.xml
     目录           0  2017-04-24 16:44  ssh_employee\src\cn\
     目录           0  2017-04-24 16:44  ssh_employee\src\cn\mani123\
     目录           0  2017-04-24 16:45  ssh_employee\src\cn\mani123\employee\
     目录           0  2017-04-27 19:01  ssh_employee\src\cn\mani123\employee\action\
     文件        1918  2017-05-01 01:38  ssh_employee\src\cn\mani123\employee\action\DepartmentAction.java
     文件        2585  2017-05-01 18:07  ssh_employee\src\cn\mani123\employee\action\EmployeeAction.java
     目录           0  2017-04-27 18:59  ssh_employee\src\cn\mani123\employee\dao\
     文件         472  2017-05-01 01:38  ssh_employee\src\cn\mani123\employee\dao\DepartmentDao.java
     文件         510  2017-05-01 18:05  ssh_employee\src\cn\mani123\employee\dao\EmployeeDao.java
     目录           0  2017-04-27 18:58  ssh_employee\src\cn\mani123\employee\dao\impl\
     文件        1894  2017-05-01 01:39  ssh_employee\src\cn\mani123\employee\dao\impl\DepartmentDaoImpl.java
     文件        1729  2017-05-13 20:34  ssh_employee\src\cn\mani123\employee\dao\impl\EmployeeDaoImpl.java
     目录           0  2017-04-27 19:39  ssh_employee\src\cn\mani123\employee\domani\
     文件         817  2017-05-01 18:13  ssh_employee\src\cn\mani123\employee\domani\Department.hbm.xml
     文件         828  2017-04-24 16:55  ssh_employee\src\cn\mani123\employee\domani\Department.java
     文件         989  2017-04-24 17:16  ssh_employee\src\cn\mani123\employee\domani\Employee.hbm.xml
     文件        1487  2017-04-24 16:57  ssh_employee\src\cn\mani123\employee\domani\Employee.java
............此处省略227个文件信息

评论

共有 条评论

相关资源