Пример #1
0
        private void BookCar(string s)
        {
            bool isBooked = false;

            if (carRepo != null)
            {
                isBooked = carRepo.BookACar(CreateReservation());
            }
            if (isBooked)
            {
                ShowDialog("Your car was successfully booked!");
                Cars.Remove(SelectedCar);
            }
            else
            {
                ShowDialog("There was an error processing request!", true);
            }
        }