package com.dyl.Employer.Controller; import java.util.ArrayList; import java.util.Date; import java.util.List; import com.dyl.Employer.dao.impl.EmployerDaoimpl; import com.dyl.Employer.model.Employer; import com.dyl.Employer.service.EmployerService; import com.dyl.Employer.service.impl.EmployerServiceimpl; import com.opensymphony.xwork2.ActionSupport; import com.opensymphony.xwork2.ModelDriven; public class EmployerAction extends ActionSupport implements ModelDriven { private Employer employer = new Employer(); private List<Employer> employerList = new ArrayList<Employer>(); private EmployerService employerservice; /*{ employerservice=new EmployerServiceimpl(); ((EmployerServiceimpl)employerservice).setEmployerDao(new EmployerDaoimpl()); }*/ public Employer getEmployer() { return employer; } public void setEmployer(Employer employer) { this.employer = employer; } public List<Employer> getEmployerList() { return employerList; } public void setEmployerList(List<Employer> employerList) { this.employerList = employerList; } public EmployerService getEmployerservice() { return employerservice; } public void setEmployerservice(EmployerService employerservice) { this.employerservice = employerservice; } @Override public Object getModel() { return employer; } public String addEmployer() { if (employer != null) { employer.setCreateDate(new Date()); } if (employerservice != null) { employerservice.addEmployer(employer); employerList = employerservice.listEmployer(); } return SUCCESS; } public String listCustomer() { employerList = employerservice.listEmployer(); return SUCCESS; } }
最近下载更多
3516569014 LV5
2023年5月7日
liqingzhao6 LV12
2020年8月5日
cxc_123 LV2
2020年6月22日
xuchi123 LV7
2020年5月2日
wanyuxia2526 LV2
2020年3月12日
xuweisong2010 LV28
2020年1月13日
1063091784 LV1
2019年12月22日
shsahhf LV7
2019年12月7日
zhuxxiaoh LV8
2019年12月5日
1242023360 LV10
2019年12月4日