Dim dr As DataRow = DataTables("材料发放明细表").find("出库单号 = '" & e.DataRow("出库单号") & "' And [物料代码] = '" & e.DataRow("物料代码") & "'")
If dr isnot nothing andalso dr("记账") IsNot Nothing Then
MessageBox.Show("材料发放明细表已记账,不能删除!", "提示")
e.Cancel = True
End If
Dim ww As DataRow = DataTables("材料入库明细表").find("入库单号 = '" & e.DataRow("入库单号") & "' And [物料代码] = '" & e.DataRow("物料代码") & "'")
If ww isnot nothing andalso ww("记账") IsNot Nothing Then
MessageBox.Show("材料入库明细表已记账,不能删除!", "提示")
e.Cancel = True
End If