If dr("条形码").StartsWith("3") Then Dim drList As List(of DataRow) = DataTables("出库单明细").Select("billno='" & dr("订单号") & "'") If drList IsNot Nothing Then For Each drr As DataRow In drList Dim dr2 As DataRow=DataTables("出库单明细汇总").Find("billno='" & dr("订单号") & "'")
if dr2 is nothing then
dr2= DataTables("出库单明细汇总").AddNew
end if
dr2("出库单号")=drr("billno")
dr2("出库数量")=drr("qty")
dr2("产品编码")=drr("itemno")
Next
End If
End If
[此贴子已经被作者于2013-7-29 9:58:06编辑过]