Beispiel #1
0
        public void RunAdminModule()
        {
            Console.Clear();
            Console.WriteLine(">>> You have been authenticated. Welcome ADMIN user!\n");

            while (option != exitValue)
            {
                DisplayAdminMenu();

                Console.Write("\nChoose an option: ");
                input = Console.ReadLine();
                bool result = Int32.TryParse(input, out option);

                if (result)
                {
                    switch (option)
                    {
                    case 1:
                        Console.Clear();
                        DisplayInventory.ListInventory();
                        break;

                    case 2:
                        Console.Clear();
                        NewItem.GetItemData();
                        break;

                    case 3:
                        Console.Clear();
                        ModifyItem.ModifyItemData();
                        break;

                    case 4:
                        Console.Clear();
                        RemoveItem.RemoveItemFromInventory();
                        break;

                    case 5:
                        Console.Clear();
                        Console.WriteLine("EXITING the application... Thank you!");
                        break;

                    default:
                        Console.Clear();
                        Console.WriteLine(">>> Invalid number. Please try again!\n");
                        break;
                    }
                }
                else
                {
                    Console.Clear();
                    Console.WriteLine(">>> Invalid input. Please try again!\n");
                }
            }
        }