Dim cr2 As Row = Tables("人员抽取_人员").current
If cr2.IsNull("面试顺序") = False Then
MessageBox.Show("已抽签完毕,不能再抽取!","温馨提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
'Return
End If
Dim dt As Table = Tables("人员抽取_人员")
Dim ids As new List(of Integer)
For Each r As Row In dt.rows
ids.Add(r.Index)
Next
For Each r As Row In dt.rows
If r.IsNull("面试顺序") = False Then
ids.Remove(r("面试顺序"))
End If
Next
Dim cnt = ids.count
'For i As Integer = 0 To cnt \ 2 '洗牌次数
'Dim id1 As Integer = rand.Next(0,cnt)
'Dim id2 As Integer = rand.Next(0,cnt)
'Dim vid As Integer = ids(id1)
'ids(id1) = ids(id2)
'ids(id2) = vid
'Next
'随机取一个
cr2("面试顺序") =ids(rand.Next(0, ids.count))