Beispiel #1
0
 public AddDoctorAppointmentViewModel(AddDoctorAppointment addDoctorAppointmentOpen, vwDoctorAppointment doctorAppointmentToEdit)
 {
     doctorAppointment    = doctorAppointmentToEdit;
     addDoctorAppointment = addDoctorAppointmentOpen;
     using (Service1Client wcf = new Service1Client())
     {
         PatientsList           = wcf.GetAllPatients().ToList();
         MedicalDepartmentsList = wcf.GetAllMedicalDepartments().ToList();
     }
 }
Beispiel #2
0
        private void AddNewDoctorAppointmentExecute()
        {
            try
            {
                AddDoctorAppointment addDoctorAppointment = new AddDoctorAppointment();
                addDoctorAppointment.ShowDialog();

                // ovo koristimo da bi posle dodavanja DoctorAppointments-a u gridu bili
                // prikazani novi rezultati, refresovani!
                using (Service1Client wcf = new Service1Client())
                {
                    DoctorAppointmentList = wcf.GetAllDoctorAppointment().ToList();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
Beispiel #3
0
 private void EditDoctorAppointmentExecute()
 {
     try
     {
         if (editDoctorAppointment != null)
         {
             AddDoctorAppointment addDoctorAppointment = new AddDoctorAppointment(DoctorAppointment);
             addDoctorAppointment.ShowDialog();
             using (Service1Client wcf = new Service1Client())
             {
                 DoctorAppointmentList = wcf.GetAllDoctorAppointment().ToList();
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }