Foxtable(狐表)用户栏目专家坐堂 → [求助]老师,请问怎么控制流水号跳码。


  共有4197人关注过本帖平板打印复制链接

主题:[求助]老师,请问怎么控制流水号跳码。

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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2015/3/12 14:19:00 [只看该作者]

Dim qs As String = e.Form.Controls("起始号段").Text
Dim js As String = e.Form.Controls("结束号段").Text
Dim gs As String = e.Form.Controls("重复个数").Text
Dim gd As String = e.Form.Controls("固定号段").Text
Dim tg() As String = e.Form.Controls("跳过").Text.Split(",")
Dim fmt As String = "".PadLeft(qs.length,"0") '根据起始数得出数字占位长短
If gs = "" Or gs = "0" Then
    MessageBox.show("请输入重复个数,无需重复请输入1","错误输入",MessageBoxButtons.OK,MessageBoxIcon.Error)
Else
    Dim str As String
    Dim tgnum As String
    For i As Integer = qs To js
        For s As Integer = 1 To gs
            Dim temp As String
            If gd > "" AndAlso e.Form.Controls("CheckBox1").Checked = True Then
                temp =  gd & Format(i,fmt) & vbcrlf
            Else If gd > "" AndAlso e.Form.Controls("CheckBox2").Checked = True Then
                temp = Format(i,fmt) & gd & vbcrlf
            Else
                temp = Format(i,fmt) & vbcrlf
            End If
            If array.Indexof(tg, i) = -1 AndAlso array.IndexOf(tg, Format(i,fmt)) = -1 Then
                str = str & temp
            End If
        Next
    Next
    Dim open As New SaveFileDialog
    open.Title = "保存号段"
    open.Filter = "文本文件|*.txt"
    open.OverwritePrompt = True
    If open.ShowDialog = DialogResult.OK Then
        FileSys.WriteAllText(open.FileName,str,False,Encoding.Unicode)
    End If
End If

 回到顶部
总数 20 1 2 下一页