예제 #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            //create an instance of the security class
            clsSecurity Sec = new clsSecurity();
            //get the new users details
            string EMail     = txtEMail.Text;
            string Password1 = txtPassword1.Text;
            string Password2 = txtPassword2.Text;

            //try to sign up the new user
            lblError.Text = Sec.SignUp(EMail, Password1, Password2, true);
        }
예제 #2
0
    protected void btnSignUp_Click(object sender, EventArgs e)
    {
        //create a new instance of the security class
        clsSecurity Sec = new clsSecurity();
        //try to sign up using the supplied credentials
        string Outcome = Sec.SignUp(txtEMail.Text, txtPassword1.Text, txtPassword2.Text, false);

        //report the outcome of the operation
        lblError.Text = Outcome;
        //store the object in the session objec for other pages to access
        Session["Sec"] = Sec;
    }
        protected void btnSignUp_Click1(object sender, EventArgs e)
        {
            //create a new instance of the security class
            clsSecurity Sec = new clsSecurity();

            //try to sign up using the supplied credentials

            //string Outcome = Sec.SignUp(txtEmail.Text, txtPassword.Text, txtConfirmPassword.Text, false);

            //report the outcome of the operation

            //lblError.Text = Outcome;


            //store the object in the session objec for other pages to access
            Session["Sec"] = Sec;

            string Error = AllCustomers.ThisCustomer.Valid(txtName.Text, txtPhonenum.Text, txtEmail.Text, DateTime.Now.Date.ToString(), txtBio.Text, txtAccountBalance.Text);


            if (Error == "")
            {
                string Outcome = Sec.SignUp(txtEmail.Text, txtPassword.Text, txtConfirmPassword.Text, false);
                lblError.Text = Outcome;

                if (Outcome == "An email has been sent to your account allowing you to activate the account. Press 'View Email' button")
                {
                    Add();
                }

                else
                {
                    lblError.Text = Outcome;
                }
            }

            else
            {
                lblError.Text = Error;
            }
        }