Esempio n. 1
0
        private void GetAllEmployees()
        {
            IList <Employee> employees = employeeDAO.GetAllEmployees();

            if (employees.Count > 0)
            {
                foreach (Employee emp in employees)
                {
                    Console.WriteLine(emp.EmployeeId.ToString().PadRight(5) + (emp.LastName + ", " + emp.FirstName).PadRight(30) + emp.JobTitle.PadRight(30) + emp.Gender.PadRight(3) + emp.BirthDate.ToShortDateString().PadRight(10));
                }
            }
            else
            {
                Console.WriteLine("**** NO RESULTS ****");
            }
        }
Esempio n. 2
0
        private MenuOptionResult GetAllEmployees()
        {
            IList <Employee> employees = employeeDAO.GetAllEmployees();

            if (employees.Count > 0)
            {
                foreach (Employee emp in employees)
                {
                    // TODO: Uncomment this after the Employee Model is implemented
                    //Console.WriteLine(emp.EmployeeId.ToString().PadRight(5) + (emp.LastName + ", " + emp.FirstName).PadRight(30) + emp.JobTitle.PadRight(30) + emp.Gender.PadRight(3) + emp.BirthDate.ToShortDateString().PadRight(10));
                }
            }
            else
            {
                Console.WriteLine("**** NO RESULTS ****");
            }
            return(MenuOptionResult.WaitAfterMenuSelection);
        }