예제 #1
0
 private void RegistrationExecute()
 {
     try
     {
         RegisterPatient reg = new RegisterPatient();
         reg.ShowDialog();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
 private void AddPatientExecute()
 {
     try
     {
         RegisterPatient register = new RegisterPatient();
         register.ShowDialog();
         if ((register.DataContext as RegisterPatientViewModel).isUpdated == true)
         {
             patientList = Service.Service.PatientsList();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
 private void EditPatientDateExecute()
 {
     try
     {
         int             id     = patient.patientId;
         int?            userId = patient.userId;
         tblUser         user   = Service.Service.UserById(userId);
         RegisterPatient create = new RegisterPatient(patient, user);
         create.ShowDialog();
         if ((create.DataContext as RegisterPatientViewModel).isUpdated == true)
         {
             patientList = Service.Service.PatientsList();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }