If e.DataCol.name="天数" OrElse e.DataCol.name="面试室" Then
If e.DataRow.IsNull("天数")=False AndAlso e.DataRow.IsNull("面试室")=False Then
e.DataRow("最高分") = DataTables("笔试成绩").Compute("max(总成绩)","天数='" & e.DataRow("天数") & "' and 面试室='" & e.DataRow("面试室") & "'")
e.DataRow("最低分") = DataTables("笔试成绩").Compute("min(总成绩)","天数='" & e.DataRow("天数") & "' and 面试室='" & e.DataRow("面试室") & "'")
e.DataRow("总分") = DataTables("笔试成绩").Compute("sum(总成绩)","天数='" & e.DataRow("天数") & "' and 面试室='" & e.DataRow("面试室") & "'")-e.DataRow("最高分")-e.DataRow("最低分")
Dim drs As List(Of DataRow) = DataTables("笔试成绩").Select("天数='" & e.DataRow("天数") & "' and 面试室='" & e.DataRow("面试室") & "'", "总成绩 desc")
e.DataRow("面试室平均值")= DataTables("笔试成绩").Compute("avg(总成绩)","天数='" & e.DataRow("天数") & "' and 面试室='" & e.DataRow("面试室") & "' and _identify not in ("& drs(0)("_Identify") & "," & drs(1)("_Identify") & ", " & drs(drs.Count-1)("_Identify") & ", " & drs(drs.Count-2)("_Identify") & ")")
e.DataRow("计数") = DataTables("笔试成绩").Compute("Count(总成绩)","天数='" & e.DataRow("天数") & "' and 面试室='" & e.DataRow("面试室") & "'")
e.DataRow("加权平均值") = e.DataTable.Compute("avg(面试室平均值)","天数='" & e.DataRow("天数") & "' and 是否加权='" & e.DataRow("是否加权") & "'" )
e.DataRow("加权系数") = e.DataRow("加权平均值")/e.DataRow("面试室平均值")
End If
End If