If e.DataCol.Name = "请购单号" Then If DataTables("送检单").Find("[请购单号] = '" & e.DataRow("请购单号") & " 'and [类型] <> '加工生产'" ) Is Nothing Then Dim a As Integer = DataTables("送检单").Compute("Sum(合格数量)"," 请购单号 ='" & e.DataRow("请购单号") & "'") e.DataRow("到货数量") = a Else Dim a1 As Integer = DataTables("送检单").Compute("Sum(不合格数量)"," 请购单号 ='" & e.DataRow("请购单号") & "'") e.DataRow("到货数量") = a1 End If End If
|