与其这样,你还不如给 NumericComboBox 命名为 y1、y2、y3 这样的名称呢,然后直接用,如
For Each dr1 As DataRow In DataTables("评价表").Select("")
dr1("评价总积分") = 0
Next '
Dim dt As Table = Tables("评价表")
For m As Integer = 0 To dt.rows.count -1
Dim jf As Single = 0
For n As Integer = 1 To 4
If dt.Rows(m)("评委" & n) = "优秀" Then
jf = e.form.controls("Y" & n).Value
Else If dt.Rows(m)("评委" & n) = "不合格"
jf = e.form.controls("B" & n).Value
Else If dt.Rows(m)("评委" & n) = "合格"
jf = e.form.controls("H" & n).Value
End If
dt.Rows(m)("评价总积分") = dt.Rows(m)("评价总积分") + jf
Next
Next