예제 #1
0
 public static List<EmployeeModel> FindByEmploymentStatusFilter(EmploymentStatusFilter? filterList, string path)
 {
     var dataStore = new DataStore { Path = path };
     var employeeModels = dataStore.GetAllRecords();
     if (filterList.HasValue && filterList != EmploymentStatusFilter.All)
     {
         var removeStatus = (filterList.Value == EmploymentStatusFilter.No);
         employeeModels.RemoveAll(employee => employee.IsCurrentEmployee == removeStatus);
     }
     return employeeModels;
 }
예제 #2
0
 //
 // POST: /Employee/Create
 public ActionResult Index(EmploymentStatusFilter? filterList)
 {
     var employeeModels = EmployeeModel.FindByEmploymentStatusFilter(filterList, Path);
     return View(employeeModels);
 }