If e.DataCol.name = "产品名称" Dim drs As List (of DataRow) = DataTables("BOM清单").Select("产品名称= '" & e.DataRow("产品名称") & "'")
e.DataRow("材料成本") = nothing For Each dr As DataRow In drs Dim dr1 As DataRow =DataTables("物料价格表").find("物料编号= '" & dr("物料编号") & "'") e.DataRow("材料成本")+= dr("数量")*dr1("单价") Next End If