package com.wages.action;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts2.ServletActionContext;
import com.wages.dao.DepartmentDao;
import com.wages.hentity.Department;
public class DepartmentAction {
private DepartmentDao departmentDao;
public DepartmentDao getDepartmentDao() {
return departmentDao;
}
public void setDepartmentDao(DepartmentDao departmentDao) {
this.departmentDao = departmentDao;
}
public Department dep;
public Department getDep() {
return dep;
}
public void setDep(Department dep) {
this.dep = dep;
}
public String adddepartment() {
return "adddepartment";
}
//²é
public String departments() {
HttpServletRequest request = ServletActionContext.getRequest();
List<Department> departments = departmentDao.department();
request.setAttribute("departments", departments);
return "departments";
}
////ɾ
public String delDepartments() {
departmentDao.delDepartment(dep.getDepartmentId());
return departments();
}
////¸Ä
public String departmentDetail() {
HttpServletRequest request = ServletActionContext.getRequest();
Department curDepartment = departmentDao.queryDepartment(dep.getDepartmentId());
request.setAttribute("curDepartment", curDepartment);
return "departmentDetail";
}
public String updateDepartment()
{
departmentDao.updateDepartment(dep);
return departments();
}
////Ôö
public String departmentAdd() {
departmentDao.departmentAdd(dep);
return departments();
}
//
}
最近下载更多
255921158 LV5
2024年7月17日
pangzhihui LV14
2024年5月15日
阿昌先生 LV13
2024年3月26日
wuying8208 LV15
2023年11月25日
hz1109 LV7
2023年11月7日
微信网友_6482083022819328 LV14
2023年5月22日
qfch120 LV8
2023年3月28日
13655961071 LV5
2022年12月24日
微信网友_6254095067451392 LV3
2022年12月9日
zhaoyangwfd LV17
2022年10月11日
最近浏览更多
奋斗的小蚂蚁 LV16
10月17日
benben2020
3月19日
暂无贡献等级
571818771 LV3
2024年12月17日
随便取个名字_哈哈 LV27
2024年11月23日
微信网友_7253744540979200 LV1
2024年11月14日
zhangsan_lisi
2024年9月18日
暂无贡献等级
255921158 LV5
2024年7月17日
quartz LV8
2024年7月1日
educationAAA LV11
2024年6月23日
ailixiya LV1
2024年6月11日

