Example #1
0
        private void RunSwitch(string userInput)
        {
            CustomerUI CUI = new CustomerUI();
            EmployeeUI EUI = new EmployeeUI();
            ScheduleUI SUI = new ScheduleUI();

            switch (userInput)
            {
            case "1": CUI.ShowCustomers(); break;

            case "2": EUI.ShowEmployees(); break;

            case "3": CUI.UpdateCustomerDatabase(); break;

            case "4": EUI.UpdateEmployeeDatabase(); break;

            case "5": SUI.ShowSchedule(LoggedIn);  break;

            case "6": SUI.ScheduleMenu(); break;

            case "0": ProgramRunning = false; break;

            default:
                Console.WriteLine("Incorrect Input");
                Console.ReadKey();
                break;
            }
        }
Example #2
0
        private List <Employee> GetEmployees()
        {
            List <Employee> Employees     = new List <Employee>();
            bool            MoreEmployees = true;

            while (MoreEmployees)
            {
                Console.Clear();
                EUI.ShowEmployees();

                Console.WriteLine("Write ID of Employee to add to Schedule: (Write \"0\" to exit)");
                string Input = Program.GetInput("number");

                if (Input == "0")
                {
                    MoreEmployees = false;
                }
                else
                {
                    Employees.Add(RepoEmp.GetEmployee(int.Parse(Input)));
                }
            }

            return(Employees);
        }