private void PageInit() { UserInfo item = Session["cudoUser"] as UserInfo; WebPager.RecordCount = bll.GetCount(item.Id); List <Rechargeorder> list = bll.GetListByuid(WebPager.CurrentPageIndex, WebPager.PageSize, item.Id); if (txtorderno.Value != string.Empty) { list = list.FindAll(delegate(Rechargeorder rc) { return(rc.OrderNo.IndexOf(txtorderno.Value.Trim()) > -1); }); } rpt_list.DataSource = list; rpt_list.DataBind(); }
private void PageInit() { WebPager.RecordCount = bll.GetCount(); List <Rechargeorder> list = bll.GetList(WebPager.CurrentPageIndex, WebPager.PageSize); if (txtorderno.Value != "") { list = list.FindAll(delegate(Rechargeorder info) { return(info.OrderNo.IndexOf(txtorderno.Value.Trim()) > -1); }); } if (txtusername.Value != "") { list = list.FindAll(delegate(Rechargeorder info) { return(info.UserName.IndexOf(txtusername.Value.Trim()) > -1); }); } if (txtprice.Value != "") { list = list.FindAll(delegate(Rechargeorder info) { return(info.OrderPrice == Convert.ToDecimal(txtprice.Value.Trim())); }); } myGrid.DataSource = list; myGrid.DataBind(); }