Select Case e.DataCol.name Case "单位", "联系人", "电话" If e.DataRow.IsNull("单位") = False AndAlso e.DataRow.isnull("联系人") = False Then Dim dr As DataRow = DataTables("表B").Find("单位 = '" & e.DataRow("单位") & "' and 联系人 = '" & e.DataRow("联系人") & "'") If dr Is Nothing Then dr = DataTables("表B").addnew dr("单位") = e.DataRow("单位") dr("联系人") = e.DataRow("联系人") End If dr("电话") = e.DataRow("电话") End If End Select