Exemple #1
0
 private void btnTao_Click(object sender, EventArgs e)
 {
     nd.TaiKhoan  = txtDKTaiKhoan.Text;
     nd.MatKhau   = txtDKMatKhau.Text;
     nd.PhanQuyen = cmbPhanQuyen.Text;
     nd.MaNV      = cmbNhanVien.SelectedValue.ToString();
     if (txtDKTaiKhoan.Text == "")
     {
         lblLoiDKTaiKhoan.Text = "Bạn chưa nhập tài khoản";
     }
     else if (txtDKMatKhau.Text == "")
     {
         lblLoiDangKiMatKhau.Text = "Bạn chưa nhập mật khẩu";
     }
     else if (txtDKMatKhau.Text != txtNhapLaiMatKhau.Text)
     {
         lblLoiNhapLaiMatKhau.Text = "Mật khẩu không trùng khớp";
     }
     else
     {
         ndbus.ThemNguoiDung(nd);
         MessageBox.Show("Tạo tài khoản thành công!");
         frmThongTinTaiKhoan frmTK = new frmThongTinTaiKhoan();
         frmTK.Show();
         this.Close();
     }
 }
        private void btnThoat_Click(object sender, EventArgs e)
        {
            DialogResult dr = MessageBox.Show("Bạn chắc chắn muốn hủy thao tác đang làm?", "Xác nhận hủy", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (dr == DialogResult.Yes)
            {
                frmThongTinTaiKhoan TK = new frmThongTinTaiKhoan();
                TK.Show();
                TK.Close();
                this.Close();
                //Application.Exit();
            }
            else
            {
                frmThongTinTaiKhoan_Load(sender, e);
            }
        }
Exemple #3
0
        private void đăngKýToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmThongTinTaiKhoan frmTK = new frmThongTinTaiKhoan();

            frmTK.Show();
        }