コード例 #1
0
ファイル: UserBatchBuy.cs プロジェクト: damoOnly/e-commerce
        private void BindProducts()
        {
            this.LoadParameters();
            ProductQuery productQuery = new ProductQuery();

            productQuery.PageSize   = this.pager.PageSize;
            productQuery.PageIndex  = this.pager.PageIndex;
            productQuery.Keywords   = this.txtProductName.Text;
            productQuery.BrandId    = this.dropBrandCategories.SelectedValue;
            productQuery.CategoryId = this.ddlCategories.SelectedValue;
            if (productQuery.CategoryId.HasValue)
            {
                productQuery.MaiCategoryPath = CategoryBrowser.GetCategory(productQuery.CategoryId.Value).Path;
            }
            productQuery.SortOrder = SortAction.Desc;
            productQuery.SortBy    = "DisplaySequence";
            Globals.EntityCoding(productQuery, true);
            DbQueryResult batchBuyProducts = ProductBrowser.GetBatchBuyProducts(productQuery);

            this.batchbuys.DataSource = batchBuyProducts.Data;
            this.batchbuys.DataBind();
            this.pager.TotalRecords = batchBuyProducts.TotalRecords;
        }