以文本方式查看主题

-  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=140721)

--  作者:zkshgm
--  发布时间:2019/9/12 10:02:00
--  如何用变量替换表名
Dim drs As List(of DataRow) = e.Row.DataRow.GetParentRow("订单").GetChildRows("订单明细")
请问 上述语句中"订单"和"订单明细"如果用变量替换,该语句如何写呢?

--  作者:有点蓝
--  发布时间:2019/9/12 10:14:00
--  
dim name as string = "订单"

Dim drs As List(of DataRow) = e.Row.DataRow.GetParentRow(name ).GetChildRows("订单明细")

--  作者:zkshgm
--  发布时间:2019/9/12 14:37:00
--  
不好意思,这个问题我想复杂了,谢谢