Foxtable(狐表)用户栏目专家坐堂 → 代码整合


  共有8740人关注过本帖树形打印复制链接

主题:代码整合

帅哥哟,离线,有人找我吗?
caoxy
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:童狐 帖子:299 积分:1939 威望:0 精华:0 注册:2011/3/9 18:17:00
代码整合  发帖心情 Post By: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 & "'")

请师傅帮忙整理,谢谢!



 回到顶部
帅哥,在线噢!
狐狸爸爸
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:管理员 帖子:47497 积分:251403 威望:0 精华:91 注册:2008/6/17 17:14:00
  发帖心情 Post By: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编辑过]

 回到顶部