Beispiel #1
0
        //TODO implement coupons
        // TODO : Add CheckAndClose method. When we try to find available car run this method
        //and check if Now > EndDate and Reservation is not closed or not cancelled then close it and set car available

        /// <summary>
        /// Befor we run the main window and allow customer working there
        /// we should check if all reservations were closed
        /// </summary>
        public void Process()
        {
            controller.CheckingUnclosedReservations();

            Console.WriteLine("Welcome to RentC, your brand new solution " +
                              "to manage and control your company's data without missing anything");

            Console.WriteLine("Press ENTER to continue or ESC to quit");

            while (true)
            {
                ConsoleKeyInfo keyInfo = Console.ReadKey();
                if (keyInfo.Key == ConsoleKey.Enter)
                {
                    MenuScreen();
                }
                else if (keyInfo.Key == ConsoleKey.Escape)
                {
                    Environment.Exit(0);
                }
                else
                {
                    continue;
                }
            }
        }