Case "第一列","第二列","第三列"
Dim v As Integer = 0
If e.DataRow.Isnull("第一列") = False Then
If e.DataRow("第一列") < 1 Then
v = 4
ElseIf e.DataRow("第一列") < 2 Then
v = 3
ElseIf e.DataRow("第一列") < 3 Then
v = 2
ElseIf e.DataRow("第一列") < 4 Then
v = 1
Else
v = 0
End If
End If
Dim v2 As Integer = 0
If e.DataRow.Isnull("第二列") = False Then
If e.DataRow("第二列") < 50 Then
v2 = 4
ElseIf e.DataRow("第二列") < 80 Then
v2 = 3
ElseIf e.DataRow("第二列") < 100 Then
v2 = 2
ElseIf e.DataRow("第二列") < 120 Then
v2 = 1
Else
v2 = 0
End If
End If
v = Math.Max(v,v2)
Dim v3 As Integer = 0
If e.DataRow.Isnull("第三列") = False Then
If e.DataRow("第三列") < 25 Then
v3 = 4
ElseIf e.DataRow("第三列") < 50 Then
v3 = 3
ElseIf e.DataRow("第三列") < 75 Then
v3 = 2
ElseIf e.DataRow("第三列") < 100 Then
v3 = 1
Else
v3 = 0
End If
End If
e.DataRow("第四列") = Math.Max(v,v3)
[此贴子已经被作者于2017/6/9 22:19:34编辑过]