删除事件那里,DataRowDeleting事件
Dim pdr As DataRow = DataTables("表B").find("系统编号 = '" & e.DataRow("系统编号") & "'")
If pdr IsNot Nothing Then
Dim str As String = ""
For Each dr As DataRow In DataTables("表A").Select("系统编号 = '" & e.DataRow("系统编号") & "' and _Identify <> " & e.DataRow("_Identify"))
str & = dr("配件名称") & vbcrlf
Next
pdr("配件名称") = str
End If