Foxtable(狐表)用户栏目专家坐堂 → [求助]打乱组合顺序


  共有2227人关注过本帖树形打印复制链接

主题:[求助]打乱组合顺序

帅哥哟,离线,有人找我吗?
农村人
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:幼狐 帖子:174 积分:2349 威望:0 精华:0 注册:2015/8/12 15:36:00
[求助]打乱组合顺序  发帖心情 Post By:2016/3/8 11:31:00 [显示全部帖子]

Dim a1 As String = e.Form.Controls("词组1").value
Dim a2 As String = e.Form.Controls("词组2").value
Dim a3 As String = e.Form.Controls("商品名称").value
Dim a4 As String = e.Form.Controls("数量").value

Dim a() As String = a1.Split(",")
Dim b() As String = a2.Split(",")
Dim c() As String = a3.Split(",")
Dim n As Integer = a1.Length - a1.Replace(",","").Length
n = n+1
Dim n1 As Integer = a2.Length - a2.Replace(",","").Length
n1 = n1+1
Dim n2 As Integer = a3.Length - a3.Replace(",","").Length
n2 = n2+1
Dim ls As new List(Of String)
For Index As Integer = 0 To a4
    Dim s As String = a(rand.Next(0,n)) & b(rand.Next(0,n1)) & c(rand.Next(0,n2)) '能否打乱此处的组合顺序?
    If ls.Contains(s) = False
        ls.add(s)
        Dim dr As DataRow
        dr = DataTables("标题设计").AddNew()
        dr("标题") = s
    Else
        index -= 1
    End If
Next


 回到顶部
帅哥哟,离线,有人找我吗?
农村人
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:幼狐 帖子:174 积分:2349 威望:0 精华:0 注册:2015/8/12 15:36:00
  发帖心情 Post By:2016/3/8 12:06:00 [显示全部帖子]

不明白怎么用呵,

 回到顶部