private void CancelReservation_Click(object sender, RoutedEventArgs e) { if (Utils.Ask(this, "Czy na pewno chcesz anulować wybraną rezerwację?")) { ReservationItem item = ((FrameworkElement)sender).DataContext as ReservationItem; CancelReservation(item.Reservation); } }
private void ShowReservationButton_Click(object sender, RoutedEventArgs e) { ReservationItem item = ((FrameworkElement)sender).DataContext as ReservationItem; ReservationWindow reservationWindow = new ReservationWindow(); reservationWindow.Owner = this; reservationWindow.ReservationItem = item; reservationWindow.Mode = ReservationWindow.ReservationMode.Summary; reservationWindow.Show(); }
private void UpdateReservation_Click(object sender, RoutedEventArgs e) { ReservationItem item = ((FrameworkElement)sender).DataContext as ReservationItem; ReservationWindow reservationWindow = new ReservationWindow(); reservationWindow.Owner = this; reservationWindow.ReservationItem = item; reservationWindow.Service = Service; reservationWindow.Authentication = Authentication; reservationWindow.Mode = ReservationWindow.ReservationMode.Edit; reservationWindow.Show(); }