protected void btnThem_Click(object sender, EventArgs e) { nxb = LayDuLieuTuForm(); cn = new chucnang(); bool exist = cn.CheckMaNhaXuatBan(nxb.MaNhaXuatBan); if (exist) { lblThongBao.Text = "Tác Giả này đã có"; } else { bool result = cn.InsertNhaXuatBan(nxb); if (result) { lblThongBao.Text = "Thêm thành công"; DoDuLieuVaoGridView(); } else { lblThongBao.Text = "Có lỗi"; } } }