예제 #1
0
            private static void displayAllRecs()
            {
                var recs = component.FindEmployee(UIInteraction.GetString("Enter the name or part of the Name to search"));

                foreach (var emp in recs)
                {
                    displayEmpInfo(emp);
                    Console.WriteLine();
                }
            }
예제 #2
0
            static void Main(string[] args)
            {
                var    fileName  = args[0];
                bool   @continue = true;
                string menu      = new StreamReader(fileName).ReadToEnd();

                do
                {
                    string choice = UIInteraction.GetString(menu);
                    @continue = processMenu(choice);
                } while (@continue);
            }
예제 #3
0
 private static void displayRec()
 {
     try
     {
         string name = UIInteraction.GetString("Enter the name to search");
         var    emp  = component.FindEmployee(name);
         Console.WriteLine("The Name is " + emp.EmployeeName);
         Console.WriteLine("The Address is " + emp.EmployeeAddress);
         Console.WriteLine("The Age is " + emp.Age);
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
 }
예제 #4
0
 private static void createEmp()
 {
     try
     {
         var emp = new Employee();
         emp.EmployeeID          = UIInteraction.GetInteger("Enter the ID of the Employee");
         emp.EmployeeName        = UIInteraction.GetString("Enter the Name");
         emp.EmployeeAddress     = UIInteraction.GetString("Enter the Address");
         emp.EmployeeDateOfBirth = UIInteraction.GetDate("Enter the date of birth in the format of dd/MM/yyyy");
         component.AddNewEmployee(emp);
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
 }