/// <summary> /// Retrives the list Available time slots for a particular doctor on a particular date /// </summary> /// <param name="doctorId"></param> /// <param name="date"></param> /// <returns>List of Availavle Time slots</returns> public List <AppointmentTime> GetDoctorAvailableTimeSlots(int doctorId, DateTime date) { AppointmentsData appointmentsData = new AppointmentsData(); List <Appointment> BookedAppointmentTimeSlots = appointmentsData.GetDoctorAppointmentsData(doctorId, date); List <AppointmentTime> AllTimeSlots = appointmentsData.GetTimeSlot(); List <AppointmentTime> availableTimeSlots = new List <AppointmentTime>(); foreach (AppointmentTime TimeSlots in AllTimeSlots) { Boolean SlotBooked = false; foreach (Appointment BookedTimeSlots in BookedAppointmentTimeSlots) { if (TimeSlots.Id == BookedTimeSlots.AppointmentTimeId) { SlotBooked = true; } } if (SlotBooked == false) { availableTimeSlots.Add(TimeSlots); } } return(availableTimeSlots); }
public void Delete(SchedulerAppointment deletedItem) { var item = AppointmentsData.First(i => i.ID == deletedItem.ID); AppointmentsData.Remove(item); }
public void Update(SchedulerAppointment postedItem) { var editedItem = AppointmentsData.First(i => i.ID == postedItem.ID); LoadNewValues(editedItem, postedItem); }
public void Delete(MySimpleAppointment deletedItem) { var item = AppointmentsData.First(i => i.ID == deletedItem.ID); AppointmentsData.Remove(item); }
public List <AppointmentTime> GetPatientsCurrentAppointmentTimeSlots(int patientId, DateTime date) { AppointmentsData appointmentsData = new AppointmentsData(); return(appointmentsData.GetPatientsCurrentAppointmentTimeSlots(patientId, date)); }
/// <summary> /// Retreaves the list of all the appointments with closed status /// </summary> /// <returns>List of Appointments</returns> public List <Appointment> GetClosedAppointmentList() { AppointmentsData appointmentsData = new AppointmentsData(); return(appointmentsData.DisplayClosedAppointments()); }
/// <summary> /// Retreaves the list of all the appointments associated to a doctor id /// </summary> /// <returns>List of Appointments</returns> public List <Appointment> GetDoctorAppointmentList(int id) { AppointmentsData appointmentsData = new AppointmentsData(); return(appointmentsData.GetDoctorAppointmentsData(id)); }
/// <summary> /// Retrives list of free time slots of a doctor on a particular date /// </summary> /// <param name="doctorId"></param> /// <param name="date"></param> /// <returns>List of Availavle Time slots</returns> public List <AppointmentTime> GetDoctorTimeSlots() { AppointmentsData appointmentsData = new AppointmentsData(); return(appointmentsData.GetTimeSlot()); }
/// <summary> /// Retrives the list of Doctor Appointment for a paricular date /// </summary> /// <param name="doctorId"></param> /// <param name="date"></param> /// <returns>List of Appointments</returns> public List <Appointment> GetDoctorTimeSlots(int doctorId, DateTime date) { AppointmentsData appointmentsData = new AppointmentsData(); return(appointmentsData.GetDoctorAppointmentsData(doctorId, date)); }