示例#1
0
 public List <DoctorAppointment> GetDoctorsAllAppointments(int docId)
 {
     try
     {
         doctorDataLayer  = new DoctorDataLayer();
         patientDataLayer = new PatientDataLayer();
         List <Appointment>       appointments       = doctorDataLayer.GetDoctorAllAppointments(docId);
         List <DoctorAppointment> doctorAppointments = new List <DoctorAppointment>();
         DoctorAppointment        doctorAppointment;
         foreach (var appointment in appointments)
         {
             doctorAppointment             = new DoctorAppointment();
             doctorAppointment.Id          = appointment.Id;
             doctorAppointment.PatientId   = appointment.PatientId;
             doctorAppointment.PatientName = patientDataLayer.GetPatientNameById(appointment.PatientId);
             doctorAppointment.Date        = appointment.Date.ToString().Split(' ')[0];
             doctorAppointment.TimeSlot    = TimeSlots.Timings[appointment.Time];
             doctorAppointment.Status      = appointment.Status;
             doctorAppointments.Add(doctorAppointment);
         }
         return(doctorAppointments);
     }
     catch (Exception e)
     {
         ExceptionHandler.PrintException(e, new StackTrace(true));
         throw e;
     }
 }
示例#2
0
 public List <Appointment> GetDoctorAppointments(int doctorId)
 {
     try {
         doctorDataLayer = new DoctorDataLayer();
         return(doctorDataLayer.GetDoctorAppointments(doctorId));
     }
     catch (Exception e)
     {
         ExceptionHandler.PrintException(e, new StackTrace(true));
         throw e;
     }
 }
示例#3
0
 //private List<SelectListItem> availableTimings;
 public DoctorBusinessLayer()
 {
     doctorDataLayer = new DoctorDataLayer();
 }