Dim dr As Row = Tables("定单明细").Current
Dim fdr As DataRow = DataTables("采购需求").Find("定单号 = '" & dr("定单号") & "' and 物料编号 = '" & dr("物料编号") & "'")
If fdr Is Nothing Then
fdr = DataTables("采购需求").AddNew()
fdr("定单号") = dr("定单号")
fdr("物料编号") = dr("物料编号")
End If
fdr("规格型号") = dr("规格型号")
fdr("物料名称") = dr("物料名称")
fdr("用料系数") = dr("用料系数")
fdr("单位") = dr("单位")
fdr("订单需求") = dr("订单需求")
fdr("客户") = dr("客户")
fdr("明细代码") = dr("明细代码")