Exemplo n.º 1
0
    protected void cmpLogin(object sender, EventArgs e)
    {
        if (!validator.checkCompanyEmail(loginEmail))
        {
            loginEmail.Text = null;
            loginEmail.Attributes["placeholder"] = "Invalid Email Address";
            loginEmail.Focus();
            return;
        }
        validateLogin();
        Company cmp = new Company();

        cmp.Email = loginEmail.Text;
        cmp.Password = loginPassword.Text;
        bool authentication = cmp.Authenticate();
        if (authentication && confirmLogin)
        {
            Session["Company"] = cmp;

            Response.Redirect("Home.aspx");
        }
    }