private void EmployeeSearch() { string firstname = CLIHelper.GetString("Enter the first name:"); string lastname = CLIHelper.GetString("Enter the last name:"); IList <Employee> employees = employeeDAO.Search(firstname, lastname); 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 ****"); } }
private MenuOptionResult EmployeeSearch() { string firstname = GetString("Enter the first name:"); string lastname = GetString("Enter the last name:"); IList <Employee> employees = employeeDAO.Search(firstname, lastname); 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); }