Beispiel #1
0
 public Flight()
 {
     IDFlight   = _NumberOfSeats = -1;
     _Origin    = _Destination = null;
     _Departure = _Arrival = DateTime.MinValue;
     Tickets    = new BookingsBase();
 }
Beispiel #2
0
 public Customer()
 {
     _Name         = _Surname = Login = null;
     _Age          = IDCustomer = -1;
     BookedFlights = new BookingsBase();
 }
Beispiel #3
0
        public void BookingMenu()
        {
            Booking CurBooking = null;

            FlightsManager Manager = FlightsManager.GetSource();
            FlightsBase    Flights = Manager.Flights;
            char           mode    = ' ';

            Console.Clear();
            OutputBookingMenu();

            do
            {
                mode = Program.EnterMode();
                switch (mode)
                {
                case 'o':
                case 'O':
                    OutputBookingMenu();
                    break;

                case 'a':
                case 'A':
                    BookedFlights.OutputBookings();
                    break;

                case 'i':
                case 'I':
                    BookingsBase.OutputCurrentBooking(CurBooking);
                    break;

                case 'b':
                case 'B':
                    Booking.BuyTicket(CurBooking);
                    break;

                case 'k':
                case 'K':
                    CurBooking = BookedFlights.FindByDate(FlightsTime.arrival);
                    Program.WriteColorLine(" < Current booking was updated > \n", ConsoleColor.Green);
                    break;

                case 'l':
                case 'L':
                    CurBooking = BookedFlights.FindByDate(FlightsTime.departure);
                    Program.WriteColorLine(" < Current booking was updated > \n", ConsoleColor.Green);
                    break;

                case 'p':
                case 'P':
                    CurBooking = BookedFlights.FindByPoints();
                    Program.WriteColorLine(" < Current booking was updated > \n", ConsoleColor.Green);
                    break;

                case 'd':
                case 'D':
                    BookedFlights.DelCurrentBooking(CurBooking);
                    break;

                case 'q':
                case 'Q':
                    break;

                default:
                    Program.WriteColorLine(" < Wrong mode > ", ConsoleColor.Red);
                    break;
                }
            } while (mode != 'q' && mode != 'Q');

            Console.Clear();
        }