Ejemplo n.º 1
0
        private void EditVisit()
        {
            var window      = new VisitWindow();
            var dataContext = new VisitDataContext(SelectedVisit);

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