protected void ListView1_ItemDataBound(object sender, ListViewItemEventArgs e)
        {
            Label lblStartTime = e.Item.FindControl("lblStartTime") as Label;
            Label lblEndTime   = e.Item.FindControl("lblEndTime") as Label;

            slot timeslot = e.Item.DataItem as slot;

            lblStartTime.Text = (timeslot.startTime.ToString("h:mmtt")).ToLower();;
            lblEndTime.Text   = (timeslot.EndTime.ToString("h:mmtt")).ToLower();
            if (timeslot.EndTime == SystemConstants.nodate)
            {
                lblEndTime.Text = "Finish";
            }
        }
        private List <List <slot> > CreateSeasonalTimetable(ProviderEDSC.ActivityScheduleDTDataTable SchedulesDT)
        {
            List <List <slot> > schedule  = new List <List <slot> >();
            List <slot>         monday    = new List <slot>();
            List <slot>         tuesday   = new List <slot>();
            List <slot>         wednesday = new List <slot>();
            List <slot>         thursday  = new List <slot>();
            List <slot>         friday    = new List <slot>();
            List <slot>         saturday  = new List <slot>();
            List <slot>         sunday    = new List <slot>();

            //var SortSchedulesDT = SchedulesDT.OrderByDescending(day => day.ActivityStartDatetime.Hour);

            foreach (var schedules in SchedulesDT)
            {
                if (!schedules.OnMonday && !schedules.OnTuesday && !schedules.OnWednesday && !schedules.OnThursday &&
                    !schedules.OnFriday && !schedules.OnSaturday && !schedules.OnSunday)
                {
                    DayOfWeek day = schedules.ActivityStartDatetime.DayOfWeek;
                    if (day == DayOfWeek.Monday)
                    {
                        schedules.OnMonday = true;
                    }
                    if (day == DayOfWeek.Tuesday)
                    {
                        schedules.OnTuesday = true;
                    }
                    if (day == DayOfWeek.Wednesday)
                    {
                        schedules.OnWednesday = true;
                    }
                    if (day == DayOfWeek.Thursday)
                    {
                        schedules.OnThursday = true;
                    }
                    if (day == DayOfWeek.Friday)
                    {
                        schedules.OnFriday = true;
                    }
                    if (day == DayOfWeek.Saturday)
                    {
                        schedules.OnSaturday = true;
                    }
                    if (day == DayOfWeek.Sunday)
                    {
                        schedules.OnSunday = true;
                    }
                }
                if (schedules.OnMonday)
                {
                    slot slMon = new slot();
                    slMon.startTime = schedules.ActivityStartDatetime;
                    slMon.EndTime   = schedules.ActivityEndDatetime;
                    slMon.Day       = DayOfWeek.Monday.ToString();
                    monday.Add(slMon);
                }
                if (schedules.OnTuesday)
                {
                    slot slTue = new slot();
                    slTue.startTime = schedules.ActivityStartDatetime;
                    slTue.EndTime   = schedules.ActivityEndDatetime;
                    slTue.Day       = DayOfWeek.Tuesday.ToString();
                    tuesday.Add(slTue);
                }
                if (schedules.OnWednesday)
                {
                    slot slWednesday = new slot();
                    slWednesday.startTime = schedules.ActivityStartDatetime;
                    slWednesday.EndTime   = schedules.ActivityEndDatetime;
                    slWednesday.Day       = DayOfWeek.Wednesday.ToString();
                    wednesday.Add(slWednesday);
                }
                if (schedules.OnThursday)
                {
                    slot slThursday = new slot();
                    slThursday.startTime = schedules.ActivityStartDatetime;
                    slThursday.EndTime   = schedules.ActivityEndDatetime;
                    slThursday.Day       = DayOfWeek.Thursday.ToString();
                    thursday.Add(slThursday);
                }
                if (schedules.OnFriday)
                {
                    slot slFriday = new slot();
                    slFriday.startTime = schedules.ActivityStartDatetime;
                    slFriday.EndTime   = schedules.ActivityEndDatetime;
                    slFriday.Day       = DayOfWeek.Friday.ToString();
                    friday.Add(slFriday);
                }
                if (schedules.OnSaturday)
                {
                    slot slSaturday = new slot();
                    slSaturday.startTime = schedules.ActivityStartDatetime;
                    slSaturday.EndTime   = schedules.ActivityEndDatetime;
                    slSaturday.Day       = DayOfWeek.Saturday.ToString();
                    saturday.Add(slSaturday);
                }
                if (schedules.OnSunday)
                {
                    slot slSunday = new slot();
                    slSunday.startTime = schedules.ActivityStartDatetime;
                    slSunday.EndTime   = schedules.ActivityEndDatetime;
                    slSunday.Day       = DayOfWeek.Sunday.ToString();
                    sunday.Add(slSunday);
                }
            }
            if (monday.Count() != 0)
            {
                monday.Sort((x, y) => y.startTime.CompareTo(x.startTime));
                monday.Reverse();
                schedule.Add(monday);
            }
            if (tuesday.Count() != 0)
            {
                tuesday.Sort((x, y) => y.startTime.CompareTo(x.startTime));
                tuesday.Reverse();
                schedule.Add(tuesday);
            }
            if (wednesday.Count() != 0)
            {
                wednesday.Sort((x, y) => y.startTime.CompareTo(x.startTime));
                wednesday.Reverse();
                schedule.Add(wednesday);
            }
            if (thursday.Count() != 0)
            {
                thursday.Sort((x, y) => y.startTime.CompareTo(x.startTime));
                thursday.Reverse();
                schedule.Add(thursday);
            }
            if (friday.Count() != 0)
            {
                friday.Sort((x, y) => y.startTime.CompareTo(x.startTime));
                friday.Reverse();
                schedule.Add(friday);
            }
            if (saturday.Count() != 0)
            {
                saturday.Sort((x, y) => y.startTime.CompareTo(x.startTime));
                saturday.Reverse();
                schedule.Add(saturday);
            }
            if (sunday.Count() != 0)
            {
                sunday.Sort((x, y) => y.startTime.CompareTo(x.startTime));
                sunday.Reverse();
                schedule.Add(sunday);
            }
            return(schedule);
        }