private void EditVisit() { var window = new VisitAddEdtiView(); var dataContext = new VisitAddEditViewModel(SelectedVisit); window.DataContext = dataContext; if (window.ShowDialog() == true) { SelectedVisit.OnPropertyChanged(); } }
private void AddVisit() { var window = new VisitAddEdtiView(); var dataContext = new VisitAddEditViewModel(); window.DataContext = dataContext; if (window.ShowDialog() == true && dataContext.Model != null) { Visits.Add(dataContext.Model); } }