Esempio n. 1
0
        private void EditVisit()
        {
            var window      = new VisitAddEdtiView();
            var dataContext = new VisitAddEditViewModel(SelectedVisit);

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