public AddTakeMedicationViewModel(AddTakeMedication addTakeMedicationOpen, vwTakeMedication takeMedicationToEdit)
 {
     takeMedication    = takeMedicationToEdit;
     addTakeMedication = addTakeMedicationOpen;
     using (Service1Client wcf = new Service1Client())
     {
         PharmacyList     = wcf.GetAllPharmacy().ToList();
         MedicalStaffList = wcf.GetAllMedicalStaff().ToList();
         PatientsList     = wcf.GetAllPatients().ToList();
     }
 }
Ejemplo n.º 2
0
 private void AddNewTakeMedicationExecute()
 {
     try
     {
         AddTakeMedication addTakeMedication = new AddTakeMedication();
         addTakeMedication.ShowDialog();
         using (Service1Client wcf = new Service1Client())
         {
             TakeMedicationList = wcf.GetAllTakeMedication().ToList();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }