예제 #1
0
        /// <summary>
        /// Choose this to enter the Add Information menu
        /// </summary>
        public static void AddInformation()
        {
            var customer      = new AddCustomer();
            var bicycle       = new AddBicycle();
            var bookingDetail = new AddBooking_detail();
            var bicycleBrand  = new AddBicycle_brand();

            Console.Clear();
            Console.WriteLine("1: Add Customer");
            Console.WriteLine("2: Add Bicycle");
            Console.WriteLine("3: Add Booking_detail");
            Console.WriteLine("4: Add Bicycle_brand");
            Console.WriteLine("5: Return to Main Menu");

            Console.WriteLine("");

            var userChoice = Console.ReadLine();

            switch (userChoice)
            {
            case "1":
                customer.AddNewCustomer();
                ReturnToMainMenu();
                break;

            case "2":
                bicycle.AddNewBicycle();
                ReturnToMainMenu();
                break;

            case "3":
                bookingDetail.AddNewBooking_detail();
                ReturnToMainMenu();
                break;

            case "4":
                bicycleBrand.AddNewBicycleBrand();
                ReturnToMainMenu();
                break;

            case "5":
                MainMenu();
                break;

            default:
                Console.Clear();
                Console.WriteLine("Input does not exist!.. Press any key except the one you pressed to get here!.. try again!.. ");
                Console.ReadKey();
                AddInformation();
                break;
            }
        }