我有一个表,看起来像这样:VB.NET LINQ结果集操作
ID/Description/textValue/dateValue/timeValue/Type
1/FRRSD /NULL /2010-04-16 00:00:00.000/NULL/classdates
现在,我已经有了一个LINQ命令拉仅排在类型是从该表classdates:
Dim dbGetRegisterDates As New dcConfigDataContext
Dim getDates = (From p In dbGetRegisterDates.webConfigOptions _
Where p.Type = "classdates" _
Select p)
我现在想显示在五个不同的标签中的数据,像这样:
lblClass1.Text = "Your class is from " & getDates.Description("FRRSD").dateValue & "to " & getDates.Description("FRRCD").dateValue
lblClass2.Text = "Your class is from " & getDates.Description("SORSD").dateValue & "to " & getDates.Description("SORCD").dateValue
基本上,我想根据描述列值拉一行,然后从同一行返回datevalue列值。
您想要显示dateValue,其中Description =“FRRCD”。 。 。 5次?重复?这听起来不对。 – 2010-05-05 17:20:40
不,我会有lbl1Class.Text其中Description = FRRSD,lbl2Class.Text其中Description = SORSD等 – davemackey 2010-05-05 17:30:19