以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 怎么实现时间和凭证号相同条件下的数据uuid全部赋值为一样 凭证编号按时间和凭证号相同的前提下 从01依次开始编号 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=173581) |
-- 作者:cnsjroom -- 发布时间:2021/12/6 17:55:00 -- 怎么实现时间和凭证号相同条件下的数据uuid全部赋值为一样 凭证编号按时间和凭证号相同的前提下 从01依次开始编号 怎么实现凭证号和时间符合条件的行 将uuid全部赋值为一样 凭证编号从01开始编号 谢谢老师 当前代码 Dim Products As List(Of String) Products = DataTables("凭证明细").GetValues("时间") Dim Products1 As List(Of String) For Each Product As String In Products Products1 = DataTables("凭证明细").GetValues("凭证号","时间=\'"& Product &"\'") For Each Product1 As String In Products1 Dim a1 As DataRow=DataTables("凭证明细").Find("时间=\'" & Product & "\'and 凭证号=\'" & Product1 & "\'") Dim a2 As DataRow=DataTables("凭证号").Find("时间=\'" & Product & "\'and 凭证号=\'" & Product1 & "\'") If a1 IsNot Nothing Then a1("uuid")=a2("uuid") End If Next Next 当前代码运行如下:
|
-- 作者:nxhylczh -- 发布时间:2021/12/6 19:34:00 -- dim Ft as string ="时间>=#2015-01-01# and 时间<= #2015-01-31#" dim VoucherNo as int.. = DataTables("凭证明细").compute("Max(凭证编号)“,Ft)+1
|
-- 作者:有点蓝 -- 发布时间:2021/12/6 20:36:00 -- For Each Product As String() In DataTables("凭证明细").GetValues("时间|凭证号") Dim a2 As DataRow=DataTables("凭证号").Find("时间=\'" & Product(0) & "\'and 凭证号=\'" & Product(1) & "\'") If a2 IsNot Nothing Then dim idx as integer = 1 For Each dr as datarow in DataTables("凭证明细").select("时间=\'" & Product(0) & "\' and 凭证号=\'" & Product(1) & "\'") dr("uuid")=a2("uuid") dr("凭证遍号")=idx idx += 1 Next End If Next
|
-- 作者:cnsjroom -- 发布时间:2021/12/7 0:16:00 -- 回复:(有点蓝)For Each Product As String() In&nb... 谢谢老师耐心指导 |
-- 作者:cnsjroom -- 发布时间:2021/12/7 0:16:00 -- 回复:(nxhylczh)dim Ft as string ="时间>=#201... 谢谢分享思路 |