protected void buttonLogin_Click(object sender, EventArgs e)
        {
            this.lectors = new LambdaLecturers(HttpUtility.HtmlEncode(this.textboxUsername.Text), HttpUtility.HtmlEncode(this.textboxPassword.Text));
            if (this.lectors.GetCheckLectorInfo())
            {
                HttpContext.Current.Session.Add(SessionEnum.SessionNames.LecturorsID.ToString(), this.lectors.GetCheckLecturersInfo_DatabaseFields().ID);

                int accessLvl = int.Parse(this.lectors.GetCheckLecturersInfo_DatabaseFields().Access.ToString());
                Session.Add(SessionEnum.SessionNames.AccessLvl.ToString(), accessLvl);
                if (accessLvl == 2)
                {
                    Response.Redirect("AdminMain.aspx");
                }
                else
                {
                    LambdaCampus lambdaCampus = new LambdaCampus();
                    HttpContext.Current.Session.Add(SessionEnum.SessionNames.CampusName.ToString(), lambdaCampus.Entity.DB_Campus.ToList().First().Place);
                    Response.Redirect(NEXT_PAGE);
                }
            }
            else
            {
                this.ErrorLabel.Visible = true;
                this.textboxPassword.Text = "";
                this.textboxUsername.Text = "";
            }
        }
 protected void buttonLogin_Click(object sender, EventArgs e)
 {
     this.lectors = new LambdaLecturers(HttpUtility.HtmlEncode(this.textboxUsername.Text), HttpUtility.HtmlEncode(this.textboxPassword.Text));
       if (this.lectors.GetCheckLectorInfo())
       {
           HttpContext.Current.Session.Add(SessionEnum.SessionNames.LecturorsID.ToString(), this.lectors.GetCheckLecturersInfo_DatabaseFields().ID);
           HttpContext.Current.Response.Redirect(NEXT_PAGE);
       }
 }
 protected void Button1_Click(object sender, EventArgs e)
 {
     if (textBoxPasswoord.Text.Equals(textBoxpwdherh.Text))
     {
         this.lambdaLecturers = new LambdaLecturers(this.textBoxEmail.Text, this.textBoxPasswoord.Text, this.textBoxNaam.Text, this.textBoxAchternaam.Text);
         if (this.lambdaLecturers.GetCheckEmailAP())
         {
             if (!this.lambdaLecturers.GetCheckExistEmail())
                 this.lambdaLecturers.SetLecturersInsertData();
             Response.Redirect("loginview.aspx");
         }
     }
     else
     {
         errorLabel.Visible = true;
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (Session[SessionEnum.SessionNames.LecturorsID.ToString()].Equals(string.Empty))
         {
             Response.Redirect(LOGOUT);
         }
         else
         {
             lecturerId = int.Parse(Session[SessionEnum.SessionNames.LecturorsID.ToString()].ToString());
             lecturer = new LambdaLecturers(lecturerId);
             lecturerPass = lecturer.GetPasswordFromId();
         }
     }
     catch
     {
         Response.Redirect(LOGOUT);
     }
 }