Ejemplo n.º 1
0
        protected void btnLoginButton_Click(object sender, EventArgs e)
        {
            string    loginId     = txtBoxUsername.Text;
            string    password    = txtBoxPassword.Text;
            bool      isChecked   = chkRemeberMe.Checked;
            SQLHelper helper      = new SQLHelper();
            bool      isLoginedIn = helper.IsUserLogin(loginId, password);

            if (isLoginedIn)
            {
                Session["LoginID"] = loginId;

                if (isChecked)
                {
                    UtilityTools.CreateCookies("LoginIDCookie", "LoginID", loginId, 24);
                }
                Response.Redirect("~/UI/Orders.aspx");
            }
            else
            {
                Response.Write("Login Failed");
            }
        }