/// <summary> /// Invoked when user clicks on edit room button /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void OnEditRoom(object sender, RoutedEventArgs e) { if (!IsRoomSelected) { MessageBox.Show("Najpierw wybierz pokój", "Błąd", MessageBoxButton.OK, MessageBoxImage.Warning); return; } AddRoomWindow window = new AddRoomWindow(context, SelectedHotelId, (room)roomDropdown.SelectedItem) { Owner = this }; window.ShowDialog(); LoadRooms(SelectedHotelId); }
/// <summary> /// Invoked when users clicks on add room button /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void OnAddRoom(object sender, RoutedEventArgs e) { if (!IsHotelSelected) { MessageBox.Show("Najpierw wybierz hotel", "Błąd", MessageBoxButton.OK, MessageBoxImage.Warning); return; } AddRoomWindow window = new AddRoomWindow(context, SelectedHotelId) { Owner = this }; window.ShowDialog(); LoadRooms(SelectedHotelId); }