private void EditResearcherButton_Click(object sender, RoutedEventArgs e) { var addWindow = new AddResearcher(true, _model.SelectedResearcher); if (addWindow.ShowDialog() ?? false) { } }
private void AddResearcherButton_Click(object sender, RoutedEventArgs e) { var addWindow = new AddResearcher(false, null); if (addWindow.ShowDialog() ?? false) { //_model.Researchers = new ObservableCollection<ResearcherViewModel>(ModelContext.Researchers.Select(r => new ResearcherViewModel(r))); _model.Researchers.Add(addWindow.Researcher); } }