If MainTable.Name = "库存" Then
Dim Arys As List(Of String())
Arys = DataTables("入库").GetValues("单位|产品")
MessageBox.show(1)
For Each ary() As String In arys
MessageBox.show(2)
Dim dr As DataRow = DataTables("库存").find("单位 = '" & ary(0) & "' and 产品 = '" & ary(1) & "'")
If dr Is Nothing Then
dr = DataTables("库存").addnew()
messagebox.show(3)
dr("单位") = Ary(0)
messagebox.show(4)
dr("产品") = Ary(1)
messagebox.show(5)
Next
End If