Ejemplo n.º 1
0
        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            this.Hide();
            DangNhap dangnhap = new DangNhap();

            dangnhap.ShowDialog();
            this.Close();
        }
Ejemplo n.º 2
0
        private void pbTroVe_Click(object sender, EventArgs e)
        {
            this.Hide();
            DangNhap dn = new DangNhap();

            dn.ShowDialog();
            this.Close();
        }
Ejemplo n.º 3
0
        private void đăngXuấtToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Hide();
            DangNhap dangNhap = new DangNhap();

            dangNhap.ShowDialog();
            this.Close();
        }
Ejemplo n.º 4
0
        private void btnTroLai_Click(object sender, EventArgs e)
        {
            this.Hide();
            DangNhap dangnhap = new DangNhap();

            dangnhap.ShowDialog();
            this.Close();
        }
Ejemplo n.º 5
0
 private void pbXacNhan_Click(object sender, EventArgs e)
 {
     if (txtMatKhau.Text == "")
     {
         lbMatKhau.Visible = true;
     }
     else
     {
         lbMatKhau.Visible = false;
     }
     if (txtReMatKhau.Text == "")
     {
         lbReMatKhau.Visible = true;
     }
     else
     {
         lbReMatKhau.Visible = false;
     }
     if (lbMatKhau.Visible == false && lbReMatKhau.Visible == false)
     {
         if (txtMatKhau.Text != txtReMatKhau.Text)
         {
             MessageBox.Show("Mật khẩu bạn nhập lại không trùng với mật khẩu bạn đã nhập, vui lòng thử lại", "Thông Báo", MessageBoxButtons.OK);
             txtMatKhau.ResetText();
             txtReMatKhau.ResetText();
             load();
             txtMatKhau.Focus();
         }
         else
         {
             DTO_KhachHang khachhang = new DTO_KhachHang();
             khachhang.SDT     = sdt;
             khachhang.MatKhau = txtMatKhau.Text;
             BO_QuenMatKhau quen = new BO_QuenMatKhau();
             if (quen.DoiMatKhau(khachhang) != -1)
             {
                 MessageBox.Show("Bạn đã đổi mật khẩu thành công", "Thông Báo", MessageBoxButtons.OK);
                 this.Hide();
                 DangNhap dangnhap = new DangNhap();
                 dangnhap.OPTIONS = options;
                 dangnhap.ShowDialog();
                 this.Close();
             }
             else
             {
                 MessageBox.Show("Đổi chưa thành công vui lòng thử lại", "Thông Báo", MessageBoxButtons.OK);
                 txtMatKhau.ResetText();
                 txtReMatKhau.ResetText();
                 txtMatKhau.Focus();
             }
         }
     }
 }
Ejemplo n.º 6
0
        private void pbXacNhan_Click(object sender, EventArgs e)
        {
            if (txtTenKH.Text == "")
            {
                lbTen.Visible = true;
            }
            else
            {
                lbTen.Visible = false;
            }
            if (txtSoDT.Text == "(+84) ")
            {
                lbSDT.Visible = true;
            }
            else
            {
                lbSDT.Visible = false;
            }
            if (txtMatKhau.Text == "")
            {
                lbMatKhau.Visible = true;
            }
            else
            {
                lbMatKhau.Visible = false;
            }
            if (txtCMND.Text == "")
            {
                lbCMND.Visible = true;
            }
            else
            {
                lbCMND.Visible = false;
            }
            if (cbbCauHoi.Text == "")
            {
                lbCauHoi.Visible = true;
            }
            else
            {
                lbCauHoi.Visible = false;
            }
            if (txtTraLoi.Text == "")
            {
                lbTraLoi.Visible = true;
            }
            else
            {
                lbTraLoi.Visible = false;
            }
            if (lbTen.Visible == false && lbSDT.Visible == false && lbMatKhau.Visible == false && lbCauHoi.Visible == false && lbTraLoi.Visible == false && lbCMND.Visible == false)
            {
                DTO_KhachHang khachhang = new DTO_KhachHang();
                khachhang.SDT         = txtSoDT.Text;
                khachhang.MatKhau     = txtMatKhau.Text;
                khachhang.TenKH       = txtTenKH.Text;
                khachhang.CMND        = txtCMND.Text;
                khachhang.CauHoiBiMat = cbbCauHoi.Text;
                khachhang.TraLoi      = txtTraLoi.Text;

                BO_DangKi dangki = new BO_DangKi();
                if (dangki.DangKi(khachhang) != -1)
                {
                    MessageBox.Show("Bạn đã đăng kí thành công!", "Thông Báo", MessageBoxButtons.OK);
                    this.Hide();
                    DangNhap dangnhap = new DangNhap();
                    dangnhap.ShowDialog();
                    this.Close();
                }
                else
                {
                    MessageBox.Show("Chưa đăng kí thành công vui lòng thử lại", "Thông báo", MessageBoxButtons.OK);
                }
            }
        }