以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  下拉列表  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=142318)

--  作者:实话实说
--  发布时间:2019/10/24 6:55:00
--  下拉列表
销售订单表中有客户代码列和订单单号列,我想在下图订单单号的下拉列表中根据销售发货表选择的客户代码行显示相应的订单单号。下面代码不行,清帮我改改。
Dim cmb As WinForm.ComboBox
cmb = e.form.Controls("ComboBox1")

Dim dr As DataRow = DataTables("销售发货").DataRows("客户代码")
\'Dim vs = DataTables("销售订单").getValues("订单单号", "[客户简称] = \'" & e.rows("客户简称") & "\'", "订单单号 desc")
Dim vs = DataTables("销售订单").getValues("订单单号", "[客户代码] = \'dr\' ", "订单单号 desc")
Dim ls As new List(of String)
‘订单单号数量限定
For Each v As String In vs
    If ls.count >= 50 Then Exit For
    ls.add(v)
Next
e.form.Controls("ComboBox1").Combolist = String.Join("|", ls.ToArray)


图片点击可在新窗口打开查看此主题相关图片如下:snap1.jpg
图片点击可在新窗口打开查看


--  作者:有点蓝
--  发布时间:2019/10/24 8:38:00
--  
不是吧,第一天出来混?

Dim cmb As WinForm.ComboBox
cmb = e.form.Controls("ComboBox1")

Dim dr As string = Tables("销售发货").current("客户代码")
\'Dim vs = DataTables("销售订单").getValues("订单单号", "[客户简称] = \'" & e.rows("客户简称") & "\'", "订单单号 desc")
Dim vs = DataTables("销售订单").getValues("订单单号", "[客户代码] = \'“ & dr & ”\' ", "订单单号 desc")
Dim ls As new List(of String)