如下代码是从“KPI考核.考核模板”表里面提取“考核月份_1月”里面的数据,可是这样是只能选定一行提取一行的数据,能不能选定“KPI考核”里面的所有行,能一次性提取所有的啊,谢谢Dim Filter As String
Dim filter2 As String = "1= 1 "
DataTables("计时工资核算").DataRows.Clear()
For Each xm As String In DataTables("考核模板").GetValues("被考核人",Filter)
Dim fdr As DataRow = DataTables("KPI考核").find("[被考核人] = '" & xm & "'")
If fdr Is Nothing Then
'fdr = DataTables("KPI考核").AddNew
fdr("被考核人") = xm
End If
fdr("月分数") = Tables("KPI考核.考核模板").compute("sum(考核月份_1月)", "被考核人 = '" & xm & "' and " & filter2)
fdr("月份") = "一月份"
Next