private void btnModifyCustomer_Click(object sender, RoutedEventArgs e) { CustomerWindow win = new CustomerWindow(c, this); win.Show(); this.Hide(); }
private void btnNext_Click(object sender, RoutedEventArgs e) { this.booking = new Booking(); try { SelectedDatesCollection Dates = calendarBookingDate.SelectedDates; if (Dates.Count <= 1) { throw new ArgumentException("You need to select and drag a range of dates!"); } if (Dates.Count > 1) { booking.ArrivalDate = Dates[0]; booking.DepartureDate = Dates[Dates.Count - 1]; } if (Dates[0].Date > Dates[Dates.Count - 1].Date) { throw new ArgumentException("The Arrival Date Can't be after the Departure Date!"); } if (customer != null) { BookingDetails winB = new BookingDetails(booking, customer, true); winB.Show(); this.Close(); } else { CustomerWindow win = new CustomerWindow(booking); win.Show(); this.Close(); } } catch (Exception ee) { MessageBox.Show(ee.Message, "Booking"); } }