Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共2 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:隔月回收编号不能用如何实现?

1楼
lin98 发表于:2025/4/16 14:11:00

3、:

Dim msg As String = e.Message
If
 msg.StartsWith(":p"AndAlso msg.EndsWith("p:"Then
    msg = msg.SubString(2, msg.Length - 4)
    If flbhs.ContainsKey(msg) Then 
'
如果存在这个月的编号
        flbhs(msg) = flbhs(msg) + 1 
'
将该月最大编号1
    
Else
        flbhs.Add(msg,1'如果是这个月的首次编号,则编号等于1
    End If
    e.ReturnValue = flbhs(msg) 
'将编号返回给客户端

End
 If

客户端的设计

选择客户端项目的订单表,

If e.DataCol.Name = "日期" Then
    If e.DataRow.IsNull(
"
日期"Then
        e.DataRow(
"
编号") = Nothing
    Else
        If QQClient.Ready = False Then
            PopMessage(
"QQClient
未启动,无法生成编号!","提示",PopIconEnum.Infomation,5)
        Else
            Dim bh As String = Format(e.DataRow(
"
日期"),"yyyyMM")
            Dim rt As String =  QQClient.SendWait(":p" & bh & "p:")
            Dim id As Integer
            If rt > "" Then
                If  Integer.TryParse(rt,id)  Then
                    e.DataRow(
"
编号") = bh & "-" & Format(id,"000")
                Else
                    PopMessage(
"
服务器返回错误信息:" & rt,"提示",PopIconEnum.Infomation,5)
                End If
            Else
                PopMessage(
"
服务器无响应,无法生成编号!","提示",PopIconEnum.Infomation,5)
            End If
        End If
    End 
If

End
 If


回收编号利用,如何处理隔月多余的编号,比如现在是2025年4月,在回收编号表中有2025年3月的编号,如何去不用,比如现应是DD-202504-001,如果回收表有DD-202503-029,如何实现?


2楼
有点蓝 发表于:2025/4/16 14:29:00
查回收表的时候加上条件,比如:

dim f as string = "原来其它条件 and 编号 like '*-202504-*'"
共2 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .02344 s, 2 queries.