MessageBox.Show(4) '这里不能弹出来,说明根本就没有查询到符合条件的数据,也就是没有执行到赋值的代码
For Each dr As DataRow In DataTables("R06_CheckMaterialAmount_Detail").select("outboundQuantity >0 and outboundWagePrice is null")
Dim dr1 As DataRow
dr1 = DataTables("R06_CheckMaterialAmount_Detail").Find("(tableCode='R03_InboundProducts' Or tableCode='R03_Delegation') And (itemID = '" & dr("itemID") & "') and (number> '"&dr("number")&"')","number",0)
If dr1 IsNot Nothing Then '如果找到符合条件的
dr("outboundWagePrice")=dr1("inboundWagePrice")
End If
Next
DataTables("R06_CheckMaterialAmount_Detail").save