public ICollection <Employee> SortRecords(ICollection <Employee> collection, EmployeeSortChoice choice) { var employees = collection as List <Employee>; EmployeeComparison employeeComparison = new EmployeeComparison(choice); employees.Sort(employeeComparison); return(employees); }
private void GetSortedRecords(EmployeeSortChoice choice) { EmployeeBusinessComponent empBo = new EmployeeBusinessComponent(); var collection = dataGridEmployees.DataSource as List <Employee>; var sortedCollection = empBo.SortRecords(collection, choice); dataGridEmployees.DataSource = null; dataGridEmployees.DataSource = sortedCollection; }
public ICollection <Department> SortRecords(ICollection <Department> collection, EmployeeSortChoice choice) { return(null); }
public EmployeeComparison(EmployeeSortChoice choice) { this.sortChoice = choice; }