예제 #1
0
        public void ScheduleCabCancellation(BookingService bookingService)
        {
            Console.WriteLine("\nDo You Want to Cancel any Cab (y/n)...");
            var isCancel = Console.ReadKey();

            if (isCancel.Key == ConsoleKey.Y)
            {
                var       cancelDetails = InputCancelDetails();
                CancelCab cancelCab     = new CancelCab(cancelDetails);
                bookingService.CancelCab(cancelCab);

                Console.WriteLine("\nConfirm Cancel (y/n)...");
                var confirmedCancel = Console.ReadKey();
                if (confirmedCancel.Key == ConsoleKey.Y)
                {
                    bookingService.ConfirmService(false);
                }
            }
        }