Exemplo n.º 1
0
        private static void PrintStaffHandlerMenu()
        {
            Console.Clear();
            Console.WriteLine("\t *** Staff *** \n");
            StaffHandler.ListAll(); // List all the staff every time

            string staffMenu = "\nEnter your choice:\n" +
                               "\t0 - Exit \n" +
                               "\t1 - List all\n" +
                               "\t2 - Add\n" +
                               "\t3 - Delete\n" +
                               "\t4 - Edit";

            Console.WriteLine(staffMenu);
        }
Exemplo n.º 2
0
        private static void OpenStaffHandlerMenu()
        {
            bool shouldBeOpen = true;

            while (shouldBeOpen)
            {
                Console.Clear();

                PrintStaffHandlerMenu();

                string userInput = Console.ReadLine();

                if (userInput == "0")
                {
                    shouldBeOpen = false;
                }
                else if (userInput == "1")
                {
                    StaffHandler.ListAll();
                    ReturnToMenu();
                }
                else if (userInput == "2")
                {
                    StaffHandler.Create();
                    ReturnToMenu();
                }
                else if (userInput == "3")
                {
                    StaffHandler.Delete();
                    ReturnToMenu();
                }
                else if (userInput == "4")
                {
                    StaffHandler.Edit();
                    ReturnToMenu();
                }
                else
                {
                    PrintInvalidChoice();
                }
            }
        }