If e.DataCol.Name = "合格品" Then Dim pr As DataRow pr = DataTables("生产排产表").Find("加工工序 = '" & e.DataRow("加工工序") & "' and 成品编码 = '" & e.DataRow("成品编码") & "' and 生产批次 = '" & e.DataRow("生产批次") & "'") If pr IsNot Nothing Then pr("合格品")= e.DataTable.Compute("sum(合格品)", "加工工序 = '" & e.DataRow("加工工序") & "' and 成品编码 = '" & e.DataRow("成品编码") & "' and _Identify <> " & e.DataRow("_Identify") & " and 生产批次 = '" & e.DataRow("生产批次") & "'") + e.DataRow("合格品") End If End If
|