Exemple #1
0
        private void ReadInput()
        {
            //store the user input into a variable. ***You can add a validate loop here in case the user uses letters. Recommendations include creating a "UTILITIES CLASS" to make it easier. We can do that l8r***
            int intUserInput = Convert.ToInt32(Console.ReadLine());
            switch (intUserInput)
            {
                case 1:
                    //list flights
                    break;
                case 2:
                    //add a new flight
                    //first have to declare and initialize an instance of the class (create a new object of the class)
                    NeatsSubMenu SubMenu = new NeatsSubMenu();
                    SubMenu.DisplaySubMenu();
                    break;
                case 3:
                    //select a flight
                    break;
                case 4:
                    //search by passenger
                    break;
                case 5:
                    //Submit the passenger manifest to TSA and update the manifest based on the returned list of flagged passengers
                    break;
                case 6:
                    //exit the system entirely
                    NeatsMainMenu.getParentForm();

                 //Environment.Exit(0);
                    break;
                default:
                    Console.WriteLine("Invalid input");
                    break;
            }
        }
Exemple #2
0
        //the intent for this method is to split the Displaying with the Read input from the user. This method should direct a user to his destination
        private void ReadInput()
        {
            //store the user input into a variable. ***You can add a validate loop here in case the user uses letters. Recommendations include creating a "UTILITIES CLASS" to make it easier. We can do that l8r***
            int intUserInput;
            do
            {
                Console.Write("Select Menu Option: ");
                intUserInput = Convert.ToInt32(Console.ReadLine());
                switch (intUserInput)
                {
                    case 1:
                        //"1. Display List of Flights"
                        myFlightConstruction = new ConstructFlight();
                        myFlightConstruction.ReadFlightData();
                        break;
                    case 2:
                        //add a new flight
                        //first have initialize an instance of the class (create a new object of the class)
                        ReadFlight();
                        break;
                    case 3:
                        //select a flight
                        //moved submenu lines below to case 3 as that's how its implemented in the NEAT.exe example he gave us
                        SubMenu = new NeatsSubMenu();
                        SubMenu.DisplaySubMenu();

                        break;
                    case 4:
                        //search by passenger
                        break;
                    case 5:
                        //exit the system entirely
                        Environment.Exit(0);
                        break;
                }
            }
            while (intUserInput != 5);
        }