예제 #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();
            }
        }
예제 #3
0
        protected void Button1_Click1(object sender, EventArgs e)
        {
            string xxx = tk.MaHoaMD5(txtMatKhau.Text);

            if (tk.KtraDangNhap(txtTaiKhoan.Text, xxx) == true)
            {
                Response.Redirect("View.aspx");
            }
            else if (tk.KtraDangNhapCus(txtTaiKhoan.Text, xxx) == true)
            {
                Response.Redirect("/Customer/ViewCustomerSignIn.aspx");
            }
            else

            {
                Response.Redirect("FormLogin.aspx");
                txtTaiKhoan.Text = "";
                txtMatKhau.Text  = "";
                txtTaiKhoan.Focus();
            }
        }