Ejemplo n.º 1
0
        protected override void OnPreRender(EventArgs e)
        {
            AuthUser au = AuthUser.GetAuthUser(Session);

            if (au != null)
            {
                Response.Redirect("~/Dashboard.aspx");
            }
            else
            {
                ClientScript.GetPostBackEventReference(this, string.Empty);
                txtPassword.Attributes.Add("onKeyPress", "javascript:if (event.keyCode == 13) __doPostBack('" + btnLogin.UniqueID + "','')");
                base.OnPreRender(e);
            }
        }
Ejemplo n.º 2
0
        protected bool validateAddUserForm()
        {
            bool retVal = false;

            if (userNameTextBox.Value.ToString() != "" && passwordTextBox.Value.ToString() == confirmpasswordTextBox.Value.ToString() && passwordTextBox.Value.ToString() != "" &&
                userFirstNameTextBox.Value.ToString() != "" && userLastNameTextBox.Value.ToString() != "")
            {
                AuthUser au = AuthUser.GetAuthUser(Session);
                User     u  = UserHandler.CreateNew(au);


                u.UserName      = userNameTextBox.Value.ToString();
                u.Password      = passwordTextBox.Value.ToString();
                u.UserFirstName = userFirstNameTextBox.Value.ToString();
                u.UserLastName  = userLastNameTextBox.Value.ToString();
            }
            else
            {
            }

            return(retVal);
        }
Ejemplo n.º 3
0
 protected void AddNewUserButton_Click(object sender, EventArgs e)
 {
     AuthUser au = AuthUser.GetAuthUser(Session);
 }