兩個態,我有兩個Repeater控件如何把在lambda表達式
var list = from i in DA.obm_view_studentLists where i.FranchiseID == FranchiseID && i.ExamDate == DateTime.Parse(this.pallavi.DropDownSelectedValue) select i;
我想導致從數據庫中1分走。
this._approvedStudentList.DataSource = list.Select(e => e.ApprovedByOBM == true);
this._pendingStudentList.DataSource = list.Select(e => e.ApprovedByOBM == false);
我在pendingStudentList中繼器的標籤字段(UnPaidTotal),我想顯示總費用待定
我試過,但失敗
UnPaidTotal = string.Format("{0:c}", list.Select(e => e.ApprovedByOBM == true).Sum(j => j.CourseFee));
你得到的錯誤信息是什麼? – 2010-09-06 01:37:53
我想你想要一個.Where()不是一個.Select()然後你可以&&條件一起.Where(p => p.x == a && p.y == b) – Robaticus 2010-09-06 02:33:37