Dim dt1 As DataTable = DataTables("孕检名单") Dim dt2 As DataTable = DataTables("期末措施") Dim dt3 As DataTable = DataTables("查询对比") dt3.DataRows.Clear For Each dr As DataRow In dt1.Select("") Dim filter As String = "单位名称 = '" & dr("单位名称") & "' and 组名称 = '" & dr("组名称") & "' and 女方姓名 = '" & dr("女方姓名") & "' and 男方姓名 = '" & dr("男方姓名") & "'" Dim fdr As DataRow = dt2.Find(filter) If fdr Is Nothing Then Dim ndr As DataRow = dt3.AddNew ndr("女方姓名") = dr("女方姓名") ndr("男方姓名") = dr("男方姓名") End If Next
|