Exemplo n.º 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);
        }
Exemplo n.º 2
0
    public void Delete(SchedulerAppointment deletedItem)
    {
        var item = AppointmentsData.First(i => i.ID == deletedItem.ID);

        AppointmentsData.Remove(item);
    }
Exemplo n.º 3
0
    public void Update(SchedulerAppointment postedItem)
    {
        var editedItem = AppointmentsData.First(i => i.ID == postedItem.ID);

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

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

            return(appointmentsData.GetPatientsCurrentAppointmentTimeSlots(patientId, date));
        }
Exemplo n.º 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());
        }
Exemplo n.º 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));
        }
Exemplo n.º 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());
        }
Exemplo n.º 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));
        }