示例#1
0
        /// <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);
        }
示例#2
0
    public void Delete(SchedulerAppointment deletedItem)
    {
        var item = AppointmentsData.First(i => i.ID == deletedItem.ID);

        AppointmentsData.Remove(item);
    }
示例#3
0
    public void Update(SchedulerAppointment postedItem)
    {
        var editedItem = AppointmentsData.First(i => i.ID == postedItem.ID);

        LoadNewValues(editedItem, postedItem);
    }
示例#4
0
    public void Delete(MySimpleAppointment deletedItem)
    {
        var item = AppointmentsData.First(i => i.ID == deletedItem.ID);

        AppointmentsData.Remove(item);
    }
示例#5
0
        public List <AppointmentTime> GetPatientsCurrentAppointmentTimeSlots(int patientId, DateTime date)
        {
            AppointmentsData appointmentsData = new AppointmentsData();

            return(appointmentsData.GetPatientsCurrentAppointmentTimeSlots(patientId, date));
        }
示例#6
0
        /// <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());
        }
示例#7
0
        /// <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));
        }
示例#8
0
        /// <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());
        }
示例#9
0
        /// <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));
        }