예제 #1
0
파일: EmployeesBL.cs 프로젝트: yon28/VAV
        public IEnumerable <Employee> SortByLastName(string ascendingORdescending)
        {
            IEnumerable <Employee> employees;

            if (ascendingORdescending == "ascending")
            {
                employees = (from s in GetList()
                             orderby s.LastName ascending
                             select s).ToList();
            }
            else
            {
                employees = (from s in GetList()
                             orderby s.LastName descending
                             select s).ToList();
            }
            foreach (Employee employee in employeesDAO.GetList())
            {
                Remove(employee);
            }
            foreach (Employee employee in employees)
            {
                Add(employee);
            }
            return(employees);
        }
예제 #2
0
파일: EmployeesBL.cs 프로젝트: yon28/VAV
 public IEnumerable <Employee> GetList()
 {
     return(employeesDAO.GetList());
 }