Dim c As DataRow = e.DataRow
Dim f1 As DataRow = DataTables("实体预算书").Find("清单 Is Not Null And QD= '" & c("QD") & "'")
Dim f2 As DataRow = DataTables("实体预算书").Find("类 = 3 And 项目编码 = '" & c("项目编码") & "'")
If f1 IsNot Nothing Then
Dim s01 As Double = DataTables("实体预算书").Compute("Sum(drf)", "清单 Is Null And QD = '" & c("QD") & "'")
f1("drf") = s01 (这部分代码已执行)
Else If f2 IsNot Nothing Then
Dim ss01 As Double = DataTables("实体预算书").Compute("Sum(drf)", "清单 Is Not Null And 项目编码 = '" & c("项目编码") & "'")
f2("drf") = ss01 (这部分代码不执行)
End If
改为固定值,也不计算
Dim f2 As DataRow = DataTables("实体预算书").Find("类 = 3 And 项目编码 = '1.01.1'")
Dim ss01 As Double = DataTables("实体预算书").Compute("Sum(drf)", "类 = 10 And 项目编码 = '1.01.1'")
几个小时,自己没有找出问题。请教指点