Dim ary() As String = {"卷1答", "卷2答"}
Dim xswpdr As DataRow = DataTables("学生问题频度").find("学号 = '" & e.DataRow("学号") & "'")
If xswpdr IsNot Nothing Then
xswpdr("知1") = 0
xswpdr("知2") = 0
xswpdr("知3") = 0
xswpdr("知4") = 0
For Each str As String In ary
Dim kmdr As DataRow = DataTables("客观问题描述").find("试卷号= '" & DataTables(str).Name.chars(1) & "'")
Dim zmdr As DataRow = DataTables("主观问题描述").find("试卷号= '" & DataTables(str).Name.chars(1) & "'")
Dim kfdr As DataRow = DataTables("客观题答案").find("试卷号 = '" & DataTables(str).Name.chars(1) & "'" )
For Each dr As DataRow In DataTables(str).DataRows
Dim t1 As String = e.DataRow("客观题1")
Dim d1 As String = kfdr("客观题1")
Dim t2 As String = e.DataRow("客观题2")
Dim d2 As String = kfdr("客观题2")
Dim t3 As String = e.DataRow("客观题3")
Dim d3 As String = kfdr("客观题3")
If t1 > "" AndAlso t2 > "" AndAlso t3 > "" Then
Dim ts() As String = {t1, t2, t3}
Dim ds() As String = {d1, d2, d3}
For i As Integer = 0 To ts.length-1
For Each s As String In ts(i)
If ds(i).Contains(s) = False Then
Select Case kmdr("题" & i + 1 & s.ToUpper() & "范")
Case "知1"
xswpdr("知1") = xswpdr("知1") + 1
Case "知2"
xswpdr("知2") = xswpdr("知2") + 1
Case "知3"
xswpdr("知3") = xswpdr("知3") + 1
Case "知4"
xswpdr("知4") = xswpdr("知4") + 1
End Select
End If
Next
Next
For i As Integer = 0 To ts.length-1
For Each s As String In ds(i)
If ts(i).Contains(s) = False Then
Select Case kmdr("题" & i + 1 & s.ToUpper() & "范")
Case "知1"
xswpdr("知1") = xswpdr("知1") + 1
Case "知2"
xswpdr("知2") = xswpdr("知2") + 1
Case "知3"
xswpdr("知3") = xswpdr("知3") + 1
Case "知4"
xswpdr("知4") = xswpdr("知4") + 1
End Select
End If
Next
Next
End If
For i As Integer = 1 To 7
If e.DataRow("主观题" & i ) = "f" Then
Select Case zmdr("题" & i & "范")
Case "知1"
xswpdr("知1") = xswpdr("知1") + 1
Case "知2"
xswpdr("知2") = xswpdr("知2") + 1
Case "知3"
xswpdr("知3") = xswpdr("知3") + 1
Case "知4"
xswpdr("知4") = xswpdr("知4") + 1
End Select
End If
Next
Next
Next
End If