Select Case e.DataCol.name Case "序号开始数","内容" Dim tmp As Integer = e.DataRow("序号开始数") If tmp >= 101 Then Dim count As Integer = 0 For i As Integer = 1 To 20 Dim ii As Integer = tmp + i - 1 If ii > 120 Then ii = ii-20 If e.DataRow("内容").contains(ii) = False Then Exit For Else count += 1 End If Next e.DataRow("从序号开始数计数起连续数") = count Else e.DataRow("从序号开始数计数起连续数") = 0 End If End Select
|