Beispiel #1
0
        protected void BrandGrid_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            IList <GoodsBrandInfo> list = IsHaveInformation == -1 ? _goodsBrandSao.GetAllBrandList().ToList()
                : _goodsBrandSao.GetBrandList(IsHaveInformation == 1).ToList();

            if (!string.IsNullOrEmpty(txt_Brand.Text.Trim()))
            {
                list = list.Where(p => p.Brand.Contains(txt_Brand.Text.Trim())).ToList();
            }
            BrandGrid.DataSource = list.OrderBy(w => w.OrderIndex).ToList();
        }