Select Case e.DataCol.Name Case "IO","商标 Dim kh As String = e.DataRow("IO") Dim cp As String = e.DataRow("商标") Dim tj = "IO = '" & kh & "' And 商标 = '" & cp & "'" If kh >"" AndAlso cp> "" Then If DataTables("辅料明细").Find(tj) Is Nothing Then Dim dr As DataRow = DataTables("辅料明细").AddNew() dr("IO") = kh dr("商标") = cp End If End If End Select