public ActionResult Index(DepartmentEmployeeModel model) { var client = new EmployeeServiceClient(); var departments = client.GetDepartments(model.StartDate, model.EndDate, model.Name).ToList(); model.Items = departments; return View(model); }
public ActionResult Employee(string id) { var model = new DepartmentEmployeeModel(); if (!string.IsNullOrEmpty(id)) { var departmentID = short.Parse(id); if (departmentID > 0) { var client = new EmployeeServiceClient(); var departments = client.GetEmployeesByDepartmentID(departmentID).ToList(); model.Items = departments; } } return View(model); }