If e.DataCol.Name = "项目编号" OrElse e.DataCol.name = "岗位层级" Then '发生变化的是"任务编号"和"岗位层级"列.
If e.DataRow("岗位层级") = "中层正职" OrElse e.DataRow("岗位层级") = "中层副职" Then
e.DataTable.ReplaceFor("总量", e.DataTable.Compute("Sum(小计)","[项目编号] = '" & e.DataRow("项目编号") & "' and 岗位层级 Like '%中层%'"), "[项目编号] = '" & e.DataRow("项目编号") & "' and 岗位层级 Like '%中层%'")
End If