Dim cut As Integer = DataTables("zk").DataRows.Count
For Each dr As DataRow In DataTables("zk").DataRows
dr("ksh") = rand.Next(0,cut)
Next
Dim kds As List(Of String)= DataTables("zk").GetValues("kdxxdm")
Dim kch As Integer = 0
For Each kd As String In kds
Dim drs As List(Of DataRow)= DataTables("zk").Select("kdxxdm = '" & kd & "'","ksh")
Dim zwh As Integer = 1
Dim ws As Integer = drs.Count Mod 30
Dim kczs As Integer = iif(ws>10,Math.Floor(drs.count/30)+1,Math.Floor(drs.count/30))
kch=kch+1
Dim i As Integer=1
For Each dr As DataRow In drs
dr("ksh")= Format(kch,"000") & Format(zwh,"00")
zwh=zwh+1
If zwh>30 And i<=kczs-1
zwh=1
kch=kch+1
i=i+1
End If
Next
Tables("zk").sort="kdxxdm,ksh"
Next
老师,我出试着了做出的结果这样请老师看下有漏洞没有