这部分代码是这样写的:
//获取指定用户的公司信息
//TheCompanyOfUser = CompanyOfUser(TheItem.U_Id);
TheCompanyOfUser = UserAllInfo(TheItem.U_Id);
uiId = QueryParam("uiId");
qaId = QueryParam("qaId");
if (string.IsNullOrEmpty(qaId))
{
Hashtable quotationAllHashtable = new Hashtable();
if (UserInfo != null && !string.IsNullOrEmpty(UserInfo.Id))
{
quotationAllHashtable.Add(QuotationAllHash.U_Id, UserInfo.Id);
}
quotationAllHashtable.Add(QuotationAllHash.BI_Id, bid);
quotationAllList = quotationAllBll.GetAllQuotationAll(quotationAllHashtable);
if (quotationAllList.Count > 0)
{
qaId = quotationAllList.OrderBy(s => s.QuoteTime).ToList()[0].Id;
}
}
我就是搞不明白这个s => s.QuoteTime中的"=>"代表着什么意思,求解
//获取指定用户的公司信息
//TheCompanyOfUser = CompanyOfUser(TheItem.U_Id);
TheCompanyOfUser = UserAllInfo(TheItem.U_Id);
uiId = QueryParam("uiId");
qaId = QueryParam("qaId");
if (string.IsNullOrEmpty(qaId))
{
Hashtable quotationAllHashtable = new Hashtable();
if (UserInfo != null && !string.IsNullOrEmpty(UserInfo.Id))
{
quotationAllHashtable.Add(QuotationAllHash.U_Id, UserInfo.Id);
}
quotationAllHashtable.Add(QuotationAllHash.BI_Id, bid);
quotationAllList = quotationAllBll.GetAllQuotationAll(quotationAllHashtable);
if (quotationAllList.Count > 0)
{
qaId = quotationAllList.OrderBy(s => s.QuoteTime).ToList()[0].Id;
}
}
我就是搞不明白这个s => s.QuoteTime中的"=>"代表着什么意思,求解
相当于
select top 1 id from table order by QuoteTime
也就是按时间排序取第一条的ID
是lmada表达式的写法,你可以把它看成是一个匿名委托
=> 这不是等于大于吗?不是啊 Lambda ?