Exemplo n.º 1
0
        private void SendValueToBLL(string displayname, string username, string email, string hash, int changepass, string createdBy, string salt)
        {
            string   ex;
            UsersBLL newuser = new UsersBLL();
            int      result  = newuser.CheckUserNameExistBLL(displayname, username, email, hash, changepass, createdBy, salt, out ex);

            if (result == -10101010)
            {
                //user already exist
                tbusername.Focus();
                lbusername.Visible = true;
            }
            else if (result == -10001111 || result == -11110000)
            {
                //failed
                lblerror.Text += "Error" + " : " + ex.ToString();
            }
            else if (result > 0)
            {
                //success
                //get new userID
                UsersDAL getID  = new UsersDAL();
                int      userID = getID.getuserID(username);

                Response.Redirect("ManageUser.aspx?UserID=" + userID);
            }
            else
            {
                //failed
                lblerror.Text += "Error" + " : " + ex.ToString();
            }
        }