此主题相关图片如下:1.png

怎么把导过来的数据插入到表中?属于哪个单位哪个组的就插入在这个单位组后面?
Dim dt1 As DataTable = DataTables("孕检名单")
Dim dt2 As DataTable = DataTables("查询对比")
For Each dr As DataRow In dt2.Select("")
Dim filter As String = "单位名称 = '" & dr("单位名称") & "' and 组名称 = '" & dr("组名称") & "' and 女方姓名 = '" & dr("女方姓名") & "' and 男方姓名 = '" & dr("男方姓名") & "'"
Dim fdr As DataRow = dt1.Find(filter)
If fdr Is Nothing Then
Dim ndr As DataRow = dt1.AddNew
ndr("女方姓名") = dr("女方姓名")
ndr("男方姓名") = dr("男方姓名")
ndr("单位名称") = dr("单位名称")
ndr("组名称") = dr("组名称")
ndr("女方姓名") = dr("女方姓名")
ndr("男方姓名") = dr("男方姓名")
End If
Next