老师,我看了下代码 有几句不是太明白我标注了一下。 我是新手,能帮忙注释一下吗?谢谢。Dim dic As New Dictionary(Of String, Double)
For Each dr As DataRow In DataTables("考核得分汇总表").Select("计分分类='综合'")
Dim key As String = dr("被考核科室")
If dic.ContainsKey(key) = False
dic.Add(key,10-dr("实际得分"))
Else
dic(key) += 10-dr("实际得分")
End If
Next
For Each k As String In dic.Keys
Output.Show(K & ":" & dic(k))
Next
Dim bm As String = "统计表1"
Dim b As New SQLGroupTableBuilder(bm,"考核得分汇总表")
b.Groups.AddDef("被考核科室")
b.Totals.AddDef("实际得分")
b.Filter = "计分分类='单项'"
b.Build
For Each dr As DataRow In DataTables(bm).DataRows
dr("实际得分") += iif(dic(dr("被考核科室")) >= 10,0,10-dic(dr("被考核科室")))
Next
MainTable = Tables(bm)