Dim Cols1() As String = {"产品"}
Dim Cols2() As String = {"产品名称"}
Dim count As Integer = DataTables("表A").Compute("count(_Identify)", "产品名称 is null")
Dim drs1 As List(Of DataRow) = DataTables("表B").Select("")
If drs1.Count > count Then
DataTables("表A").AddNew(drs1.Count - count)
End If
Dim drs2 As List(Of DataRow) = DataTables("表A").Select("产品名称 is null")
For i As Integer = 0 To drs1.Count - 1
Dim dr1 As DataRow = drs1(i)
Dim dr2 As DataRow = drs2(i)
For j As Integer = 0 To Cols1.Length -1
dr2(Cols2(j)) = dr1(Cols1(j))
Next
Next
Dim Cols3() As String = {"规格"}
Dim Cols4() As String = {"规格型号"}
count = DataTables("表A").Compute("count(_Identify)", "规格型号 is null")
drs1 = DataTables("表C").Select("")
If drs1.Count > count Then
DataTables("表A").AddNew(drs1.Count - count)
End If
drs2 = DataTables("表A").Select("规格型号 is null")
For i As Integer = 0 To drs1.Count - 1
Dim dr1 As DataRow = drs1(i)
Dim dr2 As DataRow = drs2(i)
For j As Integer = 0 To Cols1.Length -1
dr2(Cols4(j)) = dr1(Cols3(j))
Next
Next