package com.action.admin;
import java.util.ArrayList;
import java.util.List;
import com.db.admin.AdminDAO;
import com.db.organization.JobVO;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;
import com.opensymphony.xwork2.Preparable;
public class AdminJobInsert{
private AdminDAO adminDAO;
private JobVO vo;
private int jobno;
private String jname;
private int slevel;
private String description;
private List<JobVO> list = new ArrayList<JobVO>();
public void setList(List<JobVO> list) {
this.list = list;
}
public void setJobno(int jobno) {
this.jobno = jobno;
}
public void setJname(String jname) {
this.jname = jname;
}
public void setSlevel(int slevel) {
this.slevel = slevel;
}
public void setDescription(String description) {
this.description = description;
}
public JobVO getVo() {
return vo;
}
public void setVo(JobVO vo) {
this.vo = vo;
}
public void setAdminDAO(AdminDAO adminDAO) {
this.adminDAO = adminDAO;
}
public String execute() throws Exception {
JobVO vo = new JobVO();
vo.setJobno(vo.getJobno() + 10);
vo.setJname(jname);
vo.setSlevel(slevel);
vo.setDescription("");
adminDAO.jobInsert(vo);
adminDAO.DeptList();
return "success";
}
}