private void MenuItem_Scene_AddPerson_Click(object sender, RoutedEventArgs e) { if (!Object.ReferenceEquals(null, DataAccessFacade.Instance.GetSceneInUseAccess().GetScene())) { var addPersonWin = new ConfigurePerson(); addPersonWin.Show(); } }
private void NewBtn_Click(object sender, RoutedEventArgs e) { var configurePersonWin = new ConfigurePerson(); configurePersonWin.Show(); configurePersonWin.Closed += (confSender, confE) => { PersonDataGrid.ItemsSource = DataAccessFacade.Instance.GetPersonAccess().GetAll(); }; }
private void EditBtn_Click(object sender, RoutedEventArgs e) { if (PersonDataGrid.SelectedItem is Person person) { var configurePersonWin = new ConfigurePerson(person); configurePersonWin.Show(); configurePersonWin.Closed += (confSender, confE) => { PersonDataGrid.ItemsSource = DataAccessFacade.Instance.GetPersonAccess().GetAll(); }; } else { MessageBox.Show(Properties.GUI.AllPersonsNotExists, Properties.GUI.AllPersonsNotExistsTitle, MessageBoxButton.OK, MessageBoxImage.Error); } }