【发布时间】:2015-10-02 11:36:47
【问题描述】:
我尝试了这段代码,但在 where 子句中有一个错误。
var subComTbl = from subCom in myDb.SubComTbls
where subCom.AuthorityID.ToString()== Authoritycombo.SelectedValue
select subCom;
SubComcombo.Visible = true;
SubComcombo.DataSource = subComTbl;
SubComcombo.DisplayMember = "SubComName";
SubComcombo.ValueMember = "SubComID";
【问题讨论】:
-
Authoritycombo 或 subCom.AuthorityID 为空
-
如果它解决了问题,请告诉我。
标签: c# winforms combobox where-in