Dim dt As DataTable = DataTables("职称评审成绩")
Dim ttl As Double = e.Form.Controls("NumericComboBox1").Value
For Each lb As String In dt.GetValues("单位类型")
Dim zys As List(Of String) = dt.GetValues("专业组名称", "单位类型 = '" & lb & "'")
For Each bj As String In zys
Dim drs As List(Of DataRow) = dt.Select("单位类型 = '" & lb & "' and [专业组名称] = '" & bj & "'", "最终成绩")
Dim ttrs As Integer = drs.Count * ttl
If ttrs < 1 Then '这种情况不知道什么意思,自己写For n As Integer = 0 To drs.Count - 1
For n As Integer = 0 To drs.Count - 1
drs(n)("等次") = "手工复审"
Next
Else
For n As Integer = 0 To drs.Count - 1
If n > ttrs Then
drs(n)("等次") = "末位淘汰"
Else
drs(n)("等次") = "入围"
End If
Next
End If
Next
Next
dt.ReplaceFor("等次", "优秀等次", "最终成绩 >= 90")
dt.ReplaceFor("等次", "直接淘汰", "最终成绩 < 60")
e.Form.Controls("成绩").Table.Sort="单位类型,专业组名称,面试顺序"