早把已知条件告诉我,至于让您着急这么长时间吗?代码远比原来的简洁:
Select Case e.DataCol.Name
Case "分"
Dim s As String = "不评定|六|五|四|三|二|一"
Dim 六分 As String = "A,B,C,D,E,F,G,H"
Dim 五分 As String = "AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL"
Dim 四分 As String = "BA,BB,BC,BD,BE,BF,BG,BH,BI,BJ,BK,BL,BM,BN,BO"
Dim 三分 As String = "CA,CB,CC,CD,CE,CF,CG,CH,CI,CJ,CK,CL,CM"
Dim 二分 As String = "DA,DB,DC,DD,DE"
Dim 一分 As String = "EA,EB,EC,ED,EE,EF"
If e.DataRow.Isnull("分") = False
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
If e.NewValue = 1
s = 一分
Else If e.NewValue = 2
s = 二分
Else If e.NewValue = 3
s = 三分
Else If e.NewValue = 4
s = 四分
Else If e.NewValue = 5
s = 五分
Else If e.NewValue = 6
s = 六分
End If
Dim drs As List(Of DataRow) = DataTables("表A").Select("分=" & e.NewValue & " and _SortKey < " & e.DataRow("_SortKey"))
n = drs.Count Mod (len(s) - len(s.Replace(",",""))+1)
e.DataRow("备注") = s.split(",")(n)
Else
e.DataRow("备注") = Nothing
e.DataRow("评定等级") = Nothing
e.DataRow("思想") = Nothing
e.DataRow("政治") = Nothing
End If
Else
e.DataRow("备注") = Nothing
e.DataRow("评定等级") = Nothing
e.DataRow("思想") = Nothing
e.DataRow("政治") = Nothing
End If
End Select