Dim s As String = "不评定|六|五|四|三|二|一
Select Case e.DataCol.Name
Case "分"
If e.NewValue > -1 And e.NewValue < 7
Dim n As Integer = e.NewValue
e.DataRow("评定等级") = s.split("|")(n)
e.DataRow("思想分") = 55
e.DataRow("政治分") = 45 +n
' e.DataRow("备注") = 这里的结果需要您提供其他字段,请将表结构截图发上来
End If
End Select
本段代码等同于您原来的代码,但效率远比原来的高,无需要判断!
[此贴子已经被作者于2013-4-4 14:32:00编辑过]