Dim dt As DataTable = DataTables("成绩")
Dim Arys As List(Of String()) = dt.GetValues("考试名称|班级代码")
For Each Ary As String() In Arys
Dim drs As List(Of DataRow) = dt.Select("[考试名称] = '" & ary(0) & "' And XXXXXXXXX, "折总 DESC")
For n As Integer = 0 To drs.Count - 1 '遍历所有行
If n > 0 AndAlso drs(n)("折总") = drs(n-1)("折总") Then '如果总分和上一行相同
drs(n)("校序") = drs(n-1)("校序") '则排名等于上一行
Else
drs(n)("校序") = n + 1 '设置排名
End If
Next
Next
老师,你好,成绩表中有个班级代码字段,规则是0321214501 (03区县) 21(学校) 2(初中)14(14级)5(期) 01 班
我想做个一排出每次考试名称下的各校序,请问XXXX处代码怎么写,谢谢