Exemplo n.º 1
0
        private void NewPatientButtonClick(object sender, RoutedEventArgs e)
        {
            var vm = new PatientDataViewModel
            {
                Patient = new Patient()
            };
            var form = new PatientData
            {
                DataContext = vm
            };

            form.ShowDialog();
            if (saveButton == true)
            {
                ((MainViewModel)DataContext).Patients.Add(vm.Patient);
            }
        }
Exemplo n.º 2
0
        private void UseButtonClick(object sender, RoutedEventArgs e)
        {
            var selectedPatient = ((MainViewModel)DataContext).SelectedPatient;

            if (selectedPatient == null)
            {
                return;
            }
            var vm = new PatientDataViewModel
            {
                Patient = selectedPatient
            };

            var form = new TreatmentSheetView
            {
                DataContext = vm
            };

            form.ShowDialog();
        }
Exemplo n.º 3
0
        private void ChangeButtonClick(object sender, RoutedEventArgs e)
        {
            var modiPatient = ((MainViewModel)DataContext).SelectedPatient;

            if (modiPatient == null)
            {
                return;
            }
            var vm = new PatientDataViewModel
            {
                Patient = modiPatient
            };

            var form = new PatientData
            {
                DataContext = vm
            };

            form.ShowDialog();
        }