Dim Q7 As Integer = 11111 For Each ary88() As String In DataTables("选课数据表").GetValues("试卷号|教室") Dim drs88 As List(Of DataRow) = DataTables("选课数据表").Select("试卷号 = '" & ary88(0) & "' and 教室 = '" & ary88(1) & "'", "试卷号") Dim bmh As String = "BXK" & Q7 For i As Integer = 0 To drs88.Count - 1 If drs88(i).Isnull("保密号") = False Then bmh = drs88(i)("保密号") Exit For End If Next
For i As Integer = 0 To drs88.Count - 1 drs88(i)("保密号") = bmh Next Q7 = Q7 + 1 Next