Exemplo n.º 1
0
        protected void LoginBtn_Click(Object sender, ImageClickEventArgs e)
        {
            // Attempt to Validate User Credentials using UsersDB
            IAccountFacade facade = new AccountFacade();
            String userId = facade.Login(email.Text, PortalSecurity.Encrypt(password.Text));

            if ((userId != null) && (userId != ""))
            {
                // Use security system to set the UserID within a client-side Cookie
                FormsAuthentication.SetAuthCookie(email.Text, RememberCheckbox.Checked);

                // Redirect browser back to originating page
                Response.Redirect("DesktopDefault.aspx");
            }
            else
            {
                Message.Text = "<" + "br" + ">Login Failed!" + "<" + "br" + ">";
            }
        }
Exemplo n.º 2
0
 public void LoginTest()
 {
     //string Login(string email, string password)
     AccountFacade facade = new AccountFacade();
     facade.Login("e", "a");
 }