private void btnluu_Click(object sender, EventArgs e) { if (tbxuser.Text.Trim() == "") { MessageBox.Show("Vui lòng nhập đầy đủ thông tin!", "Thông báo!", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } int isad = 0; if (chbxadmin.CheckState == CheckState.Checked) { isad = 1; } if (!account.AddAccount(tbxuser.Text.Trim(), idNhanVien, isad, ref err)) { MessageBox.Show(err, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } MessageBox.Show("Thêm thành công!", "Thông báo!", MessageBoxButtons.OK, MessageBoxIcon.Information); tbxuser.ResetText(); LoadData(); }