protected void Button_Query_Click(object sender, EventArgs e) { int year = int.Parse(DropDownList_Year.SelectedItem.Value); int month = int.Parse(DropDownList_Month.SelectedItem.Value); WarnStatistics_BLL bll = new WarnStatistics_BLL(); List <PF.Models.SQL.WarnStatistics> list = bll.GetList(a => a.Year == year && a.Month == month).OrderBy(a => a.WarnCategory).ThenBy(a => a.LevelOrder).ToList(); Repeater_List.DataSource = list; Repeater_List.DataBind(); }
public void BindData() { int Year = int.Parse(DropDownList_Year.SelectedItem.Value); int Month = int.Parse(DropDownList_Month.SelectedItem.Value); Score_Month_BLL bll = new Score_Month_BLL(); List <Score_Month> list = bll.GetList(a => a.Year == Year && a.Month == Month && a.YBUserName != "集体").OrderByDescending(a => a.WeightedTotal).ToList(); Score_Month group = bll.GetList(a => a.Year == Year && a.Month == Month && a.YBUserName == "集体").FirstOrDefault(); list.Add(group); Repeater_List.DataSource = list; Repeater_List.DataBind(); }