protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (HttpContext.Current.Session[SessionEnum.SessionNames.LecturorsID.ToString()].Equals(string.Empty))
                    HttpContext.Current.Response.Redirect(NEXT_PAGE);
            }
            catch
            {
                HttpContext.Current.Response.Redirect(NEXT_PAGE);
            }

            List<Slots> list = new TableAP().GetTableReservationsByLecturerID();
            TableAP tableReservation = new TableAP(list);
            int rowCnt = list.Count;

            for (int i = 0; i < tableReservation.List.Count; i++)
            {
                tableReservation.Index = i;
                this.tableDatum.Rows.Add(tableReservation.GetTableDate());
                this.tableBegin.Rows.Add(tableReservation.GetTableDateBegin());
                this.tableEind.Rows.Add(tableReservation.GetTableDateEnd());
                this.tableDigitaal.Rows.Add(tableReservation.GetTableDigital());
                this.tableDuur.Rows.Add(tableReservation.GetTableDuration());
                this.tableLocatie.Rows.Add(tableReservation.GetTableLocation());

            }

            ButtonGenerator b = new ButtonGenerator(rowCnt);
            for (int i = 0; i < rowCnt; i++)
            {
                Panel1.Controls.Add(b.WriteReservationButton(i, list.ElementAt(i).ID.ToString())); //slot id
                b.ClickReservationsDelete(i);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (HttpContext.Current.Session[SessionEnum.SessionNames.LecturorsID.ToString()].Equals(string.Empty))
                    HttpContext.Current.Response.Redirect(NEXT_PAGE);
            }
            catch
            {
                HttpContext.Current.Response.Redirect(NEXT_PAGE);
            }

            this.entity = new Entity();
            int aantal_buttons = this.entity.DB_Slots.Count;
            this.buttons = new ButtonGenerator(aantal_buttons);

            //MessageBox.Show(HttpContext.Current.Session[SessionEnum.SessionNames.CampusName.ToString()].ToString());

            this.lambdaCampus = new LambdaCampus(HttpContext.Current.Session[SessionEnum.SessionNames.CampusName.ToString()].ToString());
            TableAP table = new TableAP(this.lambdaCampus.GetFilterToCampus());

            for (int i = 0; i < table.List.Count; i++)
            {
                table.Index = i;
                this.tableDatum.Rows.Add(table.GetTableDate());
                this.tableBegin.Rows.Add(table.GetTableDateBegin());
                this.tableEind.Rows.Add(table.GetTableDateEnd());
                this.tableDigitaal.Rows.Add(table.GetTableDigital());
                this.tableDuur.Rows.Add(table.GetTableDuration());
                this.tableLocatie.Rows.Add(table.GetTableLocation());
                this.tableBeschikbaar.Rows.Add(table.GetTableAvailibility());
                this.tableCapaciteit.Rows.Add(table.GetTableCapacity());

                Panel1.Controls.Add(buttons.WriteButton(i, table.List.ElementAt(i).ID.ToString()));
                this.buttons.ClickSlots(i);
            }
            lblCampus.Text = lambdaCampus.CampusName;
        }