以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  代码整合  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=17239)

--  作者:caoxy
--  发布时间:2012/3/7 19:19:00
--  代码整合

师傅你好:

我在一张总表中,调用另外两张表或多张表的数据,不知道如何整合通用,例如:

ENTAR事件:

Dim s As String = e.Form.Controls("ComboBox6").Value
e.Sender.Combolist = DataTables("铁盘订单").GetComboListString("规格尺寸", "[订单编号] = \'" & s & "\'")
Dim n As String = e.Form.Controls("ComboBox6").Value
e.Sender.Combolist = DataTables("木盘订单").GetComboListString("规格尺寸", "[订单编号] = \'" & n & "\'")

Dim s As String = e.Form.Controls("ComboBox6").Value
e.Sender.Combolist = DataTables("木箱订单").GetComboListString("规格尺寸", "[订单编号] = \'" & f & "\'")

Dim s As String = e.Form.Controls("ComboBox6").Value
e.Sender.Combolist = DataTables("全铁盘订单").GetComboListString("规格尺寸", "[订单编号] = \'" & r & "\'")

Dim s As String = e.Form.Controls("ComboBox6").Value
e.Sender.Combolist = DataTables("木托架订单").GetComboListString("规格尺寸", "[订单编号] = \'" & t & "\'")

请师傅帮忙整理,谢谢!



--  作者:狐狸爸爸
--  发布时间:2012/3/7 20:20:00
--  

Dim s As String = e.Form.Controls("ComboBox6").Value
Dim v1 As String = DataTables("铁盘订单").GetComboListString("规格尺寸", "[订单编号] = \'" & s & "\'")
Dim v2 As String =  DataTables("木箱订单").GetComboListString("规格尺寸", "[订单编号] = \'" & s & "\'")
Dim v3 As String = DataTables("全铁盘订单").GetComboListString("规格尺寸", "[订单编号] = \'" & s & "\'")
Dim v4 As String = DataTables("木托架订单").GetComboListString("规格尺寸", "[订单编号] = \'" & s & "\'")
e.Sender.ComboList = v1 & "|" & v2 & "|" & v3 & "|" & v4

[此贴子已经被作者于2012-3-7 20:20:27编辑过]