Exemple #1
0
        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);
        }
Exemple #2
0
        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);
 }
Exemple #4
0
 public EmployeeComparison(EmployeeSortChoice choice)
 {
     this.sortChoice = choice;
 }