コード例 #1
0
ファイル: Display Menu.cs プロジェクト: olso4631/OlsonRepo
        public int HomeMenu()


        {
            int userSelection = 0;

            do
            {
                userSelection = MainMenu();
                DisplayOrder    display  = new DisplayOrder();
                AddEntry        addorder = new AddEntry();
                RemoveOrder     remove   = new RemoveOrder();
                QuitDisplayMenu quit     = new QuitDisplayMenu();
                EditEntry       edit     = new EditEntry();

                switch (userSelection)
                {
                case 1:
                    Console.Clear();
                    display.askDay();
                    break;

                case 2:
                    Console.Clear();
                    addorder.AddOrder();     // This adds order
                    break;

                case 3:
                    Console.Clear();
                    edit.EditEntries();
                    break;

                case 4:
                    Console.Clear();
                    remove.RemoveTheOrder();
                    break;

                case 5:
                    quit.Quit();
                    break;
                }
                ;
            } while (userSelection != 5);

            return(0);
        }
コード例 #2
0
ファイル: Display Menu.cs プロジェクト: abelbalwierz/resume
        public int HomeMenu()
        {
            int userSelection = 0;
            do
            {
                userSelection = MainMenu();
                DisplayOrder display = new DisplayOrder();
                AddEntry addorder = new AddEntry();
                RemoveOrder remove = new RemoveOrder();
                QuitDisplayMenu quit = new QuitDisplayMenu();
                EditEntry edit = new EditEntry();

                switch (userSelection)
                {
                    case 1:
                        Console.Clear();
                        display.askDay();
                        break;
                    case 2:
                        Console.Clear();
                        addorder.AddOrder(); // This adds order
                        break;
                    case 3:
                        Console.Clear();
                        edit.EditEntries();
                        break;
                    case 4:
                        Console.Clear();
                        remove.RemoveTheOrder();
                        break;
                    case 5:
                        quit.Quit();
                        break;

                };
            } while (userSelection != 5);

            return 0;
        }