【发布时间】:2014-01-28 05:16:54
【问题描述】:
我从vbForums 获得此代码,其中在Floor 列中获得不同的楼层值。 (我用它来填充组合框)
Dim names = From row In FbuildingSettings.camButtonDtable.AsEnumerable() Select row.Field(Of Integer)("Floor") Distinct
我在想,有没有办法在选定的Building(另一列)中获得不同的楼层。类似于:
SELECT Distinct Floor FROM Building = 'Megamart'
抱歉,如果线路中断,则不擅长此操作。但可能是这样的。我需要的是,获取我选择的Building 中的所有Floor 数据。假设我想要 megamart,然后将项目添加到组合框中,这些项目是来自 megamart 的Floor 数据。
更新我试过这个:
Dim names = From row In FbuildingSettings.camButtonDtable.AsEnumerable() _
Select row.Field(Of String)("Building") & row.Field(Of Integer)("Floor") Distinct
但它似乎只连接了来自建筑物 + 楼层的数据。 (megamart1)
【问题讨论】: