项目事件,mainTableChanged,代码
If MainTable.Name = "差异统计表" Then
MainTable.DataTable.DataRows.Clear
For Each ary As String() In DataTables("车间入库数量统计表").GetValues("产品图号|产品名称", "产品图号 is not null or 产品名称 is not null")
Dim nr As Row = MainTable.AddNew
nr("产品图号") = ary(0)
nr("产品名称") = ary(1)
Dim fdr As DataRow = DataTables("车间入库数量统计表").Find("产品图号 = '" & ary(0) & "' and 产品名称 = '" & ary(1) & "' And 库房保管员姓名 Is not null And 车间名称 Is not null")
If fdr IsNot Nothing Then
nr("库房保管员姓名") = fdr("库房保管员姓名")
nr("车间名称") = fdr("车间名称")
End If
Next
For Each ary As String() In DataTables("销售入库数量统计表").GetValues("产品图号|产品名称", "产品图号 is not null or 产品名称 is not null")
If MainTable.DataTable.Find("产品图号 = '" & ary(0) & "' and 产品名称 = '" & ary(1) & "'") Is Nothing Then
Dim nr As Row = MainTable.AddNew
nr("产品图号") = ary(0)
nr("产品名称") = ary(1)
End If
Next
End If