예제 #1
0
        protected void Button2_Click(object sender, EventArgs e)
        {
            string pass = tk.MaHoaMD5(txtPass.Text);

            if (tk.KtraTonTaiCustomer(txtName.Text) == false && tk.KtraTonTaiAddMin(txtName.Text) == false)
            {
                tk.AddTaiKhoanCus(pass, txtName.Text, Convert.ToInt16(txtTuoi.Text), txtEmail.Text, txtDiaChi.Text, txtSDT.Text, txtMatour.Text);
                Response.Redirect("FormSignIn.aspx");
            }
            else
            {
                Response.Redirect("FormSignUp.aspx");
                txtName.Text = "";
                txtName.Focus();
            }
        }
예제 #2
0
        protected void Button2_Click(object sender, EventArgs e)
        {
            string pass = tk.MaHoaMD5(txtpass1.Text);

            //nếu bạn muốn các chữ cái in thường thay vì in hoa thì bạn thay chữ "X" in hoa trong "X2" thành "x"
            if (tk.KtraTonTaiAddMin(txtusername1.Text) == false && tk.KtraTonTaiCustomer(txtusername1.Text) == false)
            {
                tk.AddTaiKhoan(txtusername1.Text, pass);
                Response.Redirect("FormLogin.aspx");
            }
            else
            {
                Response.Redirect("FormAddAddmin.aspx");
                txtusername1.Text = "";
                txtusername1.Focus();
            }
        }