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