public ActionResult Index() { RegisterModel model = new RegisterModel(); PersonService pservice = new PersonService(); DepartmentService departmentService = new DepartmentService(); //model.ListOfPersonName = pservice.GetListOnWorkingOfPersonName(System.DateTime.Now, null, null).ToList(); model.Departments = departmentService.GetAll().ToList(); model.ListOfPersonName = pservice.GetListOnWorkingOfPersonDto(System.DateTime.Now, null, null).ToList(); return View(model); }
public ActionResult Index() { PersonModel model = new PersonModel(); GenderService genderService = new GenderService(); DepartmentService departmentService = new DepartmentService(); ChucDanhService chucDanhService = new ChucDanhService(); PersonService personService = new PersonService(); model.Departments = departmentService.GetAll().ToList(); model.Departments.Insert(0, new Department() { Id = -1, Name = "Tất cả"}); model.ChucDanhs = chucDanhService.GetAll().ToList(); model.ReportDate = System.DateTime.Now.ToShortDateString(); model.ListOfFilterNames = new List<FilterName>(); model.ListOfFilterNames.Add(new FilterName() { Id = 1, Name = "Đang công tác" }); model.ListOfFilterNames.Add(new FilterName() { Id = 2, Name = "Thôi việc" }); model.ListOfFilterNames.Add(new FilterName() { Id = 3, Name = "Tất cả" }); model.Genders = genderService.GetAll().ToList(); return View(model); }