Dim Vals3 As List(Of String())
Vals3 = DataTables("表A").GetValues("单号|料号|品名|数量","[审核]<> '已审核' ")'
For r As Integer = 0 To Vals3.Count - 1
Dim dr3 As DataRow = DataTables("表D").find("订单单号='" & Vals3(r)(0) & "'and 产品编号='" & Vals3(r)(1) & "'")'
If dr3 Is Nothing Then
dr3 = DataTables("表D").AddNew()'接收表
dr3("单号") = Vals3(r)(0)'
dr3("料号") = Vals3(r)(1)'
dr3("品名") = Vals3(r)(2)'
dr3("表A数量") = Vals3(r)(3)'
End If
dr3("单号") = Vals3(r)(0)'
dr3("料号") = Vals3(r)(1)'
dr3("品名") = Vals3(r)(2)'
dr3("表A数量") = Vals3(r)(3)'
Next
问题一:执行上面代码,只显示"单号、数量的数据,没有"单号|料号|品名|数量,是什么问题?
问题二:需求的条件是取表A的审核列不是已审核的数据,表A的审核列有已审核、未审核、空值,下面代码无法实现
Vals3 = DataTables("表A").GetValues("单号|料号|品名|数量","[审核]<> '已审核' ")'
Vals3 = DataTables("表A").GetValues("单号|料号|品名|数量","[审核]<> '已审核'AND [审核]<> ''")'
问题三:蓝色代码二个写法都一样,是一样的意思?