Beispiel #1
0
        private void EditVisit()
        {
            var window      = new VisitWindow();
            var dataContext = new VisitDataContext(SelectedVisit);

            window.DataContext = dataContext;
            if (window.ShowDialog() == true)
            {
                SelectedVisit.OnPropertyChanged();
            }
        }
Beispiel #2
0
        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);
            }
        }