16,554
社区成员
发帖
与我相关
我的任务
分享
Case 3
Dim myadapter3 As SqlDataAdapter = New SqlDataAdapter("select id,que_answer" + " from tb_Questions where que_type='单选题'and que_lessonid='" + dd1 + "'and que_taotiid='" + dd2 + "'order by id desc", con)
Dim myds3 As DataSet = New DataSet()
myadapter3.Fill(myds3)
Dim row1() As DataRow = myds3.Tables(0).Select()
'计算单选题成绩
For Each answer1 As DataRow In row1
int_row1 += 1
Dim rbl As RadioButtonList = CType(DataList1.Items(int_row1 - 1).FindControl("RadioButtonList1"), RadioButtonList)
If (rbl.SelectedValue = "") Then
Me.lblSel.Text = "单选题:0分"
Else
If (answer1("que_answer").ToString().Trim() = rbl.SelectedValue.ToString().Trim()) Then
int_row1Point += 40 / DataList1.Items.Count
Me.lblSel.Text = "单选题:" + int_row1Point.ToString() + "分"
End If
End If
Next
Exit Select