private void txtLoaiSanPham_Validated(object sender, EventArgs e) { if (this.txtLoaiSanPham.Text != string.Empty) { if (!LoaiSanPhamBUS.KiemTraMaLoaiTonTai(this.txtLoaiSanPham.Text)) { MessageBox.Show("Mã loại không tồn tại !!!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); this.txtLoaiSanPham.Focus(); } } }