Dim dr As DataRow = e.DataRow Dim dt As DataTable =DataTables("加班人员表") If e.DataCol.Name = "月份" OrElse e.DataCol.Name = "姓名" if e.DataRow.IsNull("月份") OrElse e.DataRow.IsNull("姓名") Then e.DataRow("正常工作日加班_小时") = Nothing Else e.DataRow("正常工作日加班_小时") = dt.Compute("Sum(合计加班时间)","[月份] = '" & dr("月份") & "' And [实际加班人员姓名] = '" & dr("姓名") & "'") End If End If
|