以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- trim,拼接字符串 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=96157) |
-- 作者:huhu -- 发布时间:2017/2/14 15:10:00 -- trim,拼接字符串 Dim r As Row = Tables("销售出库单列表").Current Dim str As String = r("发货要求") Dim gdh,gdhh,filter As String Dim gdsl() As String = str.Split("|") For Index As Integer = 0 To gdsl.Length - 1 Dim gds() As String = gdsl(Index).Split("_") filter &= "(" & "物料编码 = \'" & r("存货编码") & "\' and 生产订单号码 = \'" & gds(0) & "\' and 工单行号 = \'" & gds(1) & "\'" & ")" & " " & "or" & " " Next Dim filter1 As String = filter.TrimEnd("or") msgbox(filter1) DataTables("配货扫描").loadFilter = "发货单号 = \'" & r("发货单号") & "\'" And filter DataTables("配货扫描").load
|
-- 作者:有点色 -- 发布时间:2017/2/14 15:15:00 -- Dim Filter As String = "1=2"
-------------
filter &= " or (" & "物料编码 = \'" & r("存货编码") & "\' and 生产订单号码 = \'" & gds(0) & "\' and 工单行号 = \'" & gds(1) & "\'" & ")" |
-- 作者:有点色 -- 发布时间:2017/2/14 15:15:00 -- 或者是
If filter > "" Then filter = filter.Substring(0, filter.length-3) |
-- 作者:huhu -- 发布时间:2017/2/14 16:24:00 -- Dim r As Row = Tables("销售出库单列表").Current Dim str As String = r("发货要求") Dim gdh,gdhh,filter As String Dim gdsl() As String = str.Split("|") For Index As Integer = 0 To gdsl.Length - 1 Dim gds() As String = gdsl(Index).Split("_") filter &= "(" & "物料编码 = \'" & r("存货编码") & "\' and 生产订单号码 = \'" & gds(0) & "\' and 工单行号 = \'" & gds(1) & "\'" & ")" & " " & "or" & " " Next If filter > "" Then filter = filter.SubString(0,filter.Length -3) End If Dim filter1 As String = "(" & filter & ")" Dim filter2 As String = filter1 And & "发货单号 = \'" & r("发货单号") & "\'"------------------这个是有问题? msgbox(filter2) DataTables("配货扫描").loadFilter = filter2 DataTables("配货扫描").load
|
-- 作者:有点色 -- 发布时间:2017/2/14 18:29:00 -- Dim filter2 As String = filter1 & " And 发货单号 = \'" & r("发货单号") & "\'" |