private void btnDangKi_Click(object sender, EventArgs e) { if (validateTextbox()) { MessageBox.Show("Điền đầy đủ thông tin!"); } else { if (checkPass()) { if (cbAdmin.SelectedItem.ToString() == "Có") { isAd = 1; } else if (cbAdmin.SelectedItem.ToString() == "Không") { isAd = 0; } DTO_Account acc = new DTO_Account(txtTk.Text, txtMk.Text, isAd, txtName.Text, txtEmail.Text, txtPhonenumber.Text, txtDiachi.Text); if (busAccount.DangKi(acc)) { MessageBox.Show("Đăng kí thành công!"); } else { MessageBox.Show("Đăng kí không thành công!"); } } else { MessageBox.Show("Mật khẩu nhập lại không khớp!"); } } }