protected override void DeleteInstance() { if (dgvList.CurrentRow == null) { return; } ChungTuNhapNccChiTietHangHoaInfo chiTietHangHoaInfo = (ChungTuNhapNccChiTietHangHoaInfo)dgvList.CurrentRow.DataBoundItem; if (TblHangHoaChiTietDataProvider.DaDungChoGiaoDichKhac(chiTietHangHoaInfo.IdChiTietHangHoa)) { throw new ManagedException("Mã vạch đã được sử dụng. Không thể thay đổi!"); } dgvList.Rows.Remove(dgvList.CurrentRow); count--; SoLuongTong = count * HangHoa.DonGia; //btnXoaDong.Enabled = false; lblTongSoLuong.Text = ""; lblthanhtien.Text = ""; lblTongSoLuong.Text = count.ToString(); lblthanhtien.Text = SoLuongTong.ToString(); }