where c.工号 == this.gh.Text.Trim() && c.密码 == this.pwd.Text
select c.权限).ToList()
if (lst.Count < 0)
{
var entity = lst[0]
var right = entity.权限
switch(right)
{
case 0:
break
case 1:
break
//case 2,3,4......
default:
break
}
}
望采纳
public List<string> GetCompany() //table_Company :建立的表名{
var depts = from dept in Dc.table_Company
select dept.公司名称 //公司名称为主键
return depts.ToList() //出错!!!
出错提示:不能将类型List<string>隐式转化为table_company
}
EnumerableRowCollection<DataRow>Query = from table in dt.AsEnumerable()where table.Field<int>("State")=1
select table
DataView dv = Query.AsDataView()
dv.Sort = "ID desc,Title asc"
this.repeater.DataSource = dv
this.repeater.DataBind()
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)