protected Model.plansCondition condition() { Model.plansCondition con = new Model.plansCondition { item_id = this.txtitem_id.Text.Trim(), goodsname = this.txtgoodsname.Text.Trim(), shopname = this.txtshopname.Text.Trim() }; if (!string.IsNullOrEmpty(ddlifok.SelectedValue)) { con.ifok = ddlifok.SelectedValue; } return(con); }
protected void DataInfoBind() { ShowPager.PageSize = PageSize; int total = 0; Model.plansCondition con = condition(); var list = new List <Model.plans>(); if (ddlsort.SelectedValue == "2") { list = bllplans.GetList(ShowPager.CurrentPageIndex, ShowPager.PageSize, ref total, con, p => p.lastOkTime, false); } else if (ddlsort.SelectedValue == "3") { list = bllplans.GetList(ShowPager.CurrentPageIndex, ShowPager.PageSize, ref total, con, p => p.lastOkTime, false); } else { list = bllplans.GetList(ShowPager.CurrentPageIndex, ShowPager.PageSize, ref total, con, p => p.id, false); } ShowPager.RecordCount = total; this.rpData.DataSource = list; this.rpData.DataBind(); }