Dim dr As DataRow = e.DataRow If e.DataRow.Isnull("业务名称") Then Dim fdr As DataRow = DataTables("机房板盘端子台帐表").Find("业务名称 is not null and 机房名称 = '" & dr("机房名称") & "' and 机柜编号 = '" & dr("机柜编号") & "' And 板盘名称 = '" & dr("板盘名称") & "' and _Identify <> " & dr("_Identify")) If fdr IsNot Nothing Then MessageBox.Show("该设备配有板件,不能删除!!!") e.Cancel = True End If End If