Esempio n. 1
0
 private void PatientClick(object sender, RoutedEventArgs e)
 {
     if (mainModel.SelectedPatient != null)
     {
         DatientDataViewModel model = new DatientDataViewModel {
             Patient = mainModel.SelectedPatient
         };
         DatientData window = new DatientData {
             DataContext = model
         };
         window.ShowDialog();
     }
 }
Esempio n. 2
0
        private void NewPatientClick(object sender, RoutedEventArgs e)
        {
            mainModel.SelectedPatient = new Patient {
                Birthday = DateTime.Now
            };
            DatientDataViewModel model = new DatientDataViewModel {
                Patient = mainModel.SelectedPatient
            };
            DatientData window = new DatientData {
                DataContext = model
            };

            window.ShowDialog();
            if (window.DialogResult == true)
            {
                mainModel.PatientList.Add(mainModel.SelectedPatient);
            }
        }