protected override void AttachChildControls()
        {
            this.rptCategories = (VshopTemplatedRepeater)this.FindControl("rptCategories");
            DataSet categoryList = CategoryBrowser.GetCategoryList();

            this.rptCategories.ItemDataBound += new RepeaterItemEventHandler(this.rptCategories_ItemDataBound);
            this.rptCategories.DataSource     = categoryList;
            this.rptCategories.DataBind();
            PageTitle.AddSiteNameTitle("商品分类");
        }
Example #2
0
        protected override void AttachChildControls()
        {
            int num;
            int num2;
            int num3;

            int.TryParse(this.Page.Request.QueryString["categoryId"], out this.categoryId);
            this.keyWord = this.Page.Request.QueryString["keyWord"];
            this.pIds    = this.Page.Request.QueryString["pIds"];
            if (!string.IsNullOrWhiteSpace(this.keyWord))
            {
                this.keyWord = this.keyWord.Trim();
            }
            this.imgUrl          = (HiImage)this.FindControl("imgUrl");
            this.litContent      = (Literal)this.FindControl("litContent");
            this.rptProducts     = (VshopTemplatedRepeater)this.FindControl("rptProducts");
            this.rptCategories   = (VshopTemplatedRepeater)this.FindControl("rptCategories");
            this.rptCategoryList = (VshopTemplatedRepeater)this.FindControl("rptCategoryList");
            this.txtTotalPages   = (HtmlInputHidden)this.FindControl("txtTotal");
            string str = this.Page.Request.QueryString["sort"];

            if (string.IsNullOrWhiteSpace(str))
            {
                str = "DisplaySequence";
            }
            string str2 = this.Page.Request.QueryString["order"];

            if (string.IsNullOrWhiteSpace(str2))
            {
                str2 = "desc";
            }
            if (!int.TryParse(this.Page.Request.QueryString["page"], out num))
            {
                num = 1;
            }
            if (!int.TryParse(this.Page.Request.QueryString["size"], out num2))
            {
                num2 = 20;
            }
            IList <CategoryInfo> maxSubCategories = CategoryBrowser.GetMaxSubCategories(this.categoryId, wid, 0x3e8);

            this.rptCategories.DataSource = maxSubCategories;
            this.rptCategories.DataBind();
            DataSet categoryList = CategoryBrowser.GetCategoryList(wid);

            this.rptCategoryList.ItemDataBound += new RepeaterItemEventHandler(this.rptCategoryList_ItemDataBound);
            this.rptCategoryList.DataSource     = categoryList;
            this.rptCategoryList.DataBind();
            this.rptProducts.DataSource = ProductBrowser.GetProducts(this.wid, MemberProcessor.GetCurrentMember(), null, new int?(this.categoryId), this.keyWord, num, num2, out num3, str, str2, this.pIds);
            this.rptProducts.DataBind();
            this.txtTotalPages.SetWhenIsNotNull(num3.ToString());
            PageTitle.AddSiteNameTitle("商品列表");
        }
Example #3
0
        protected override void AttachChildControls()
        {
            int num2;
            int num3;
            int num4;

            int.TryParse(this.Page.Request.QueryString["categoryId"], out this.categoryId);
            int num = Globals.RequestQueryNum("isLimitedTimeDiscountId");

            this.keyWord = this.Page.Request.QueryString["keyWord"];
            this.pIds    = this.Page.Request.QueryString["pIds"];
            if (!string.IsNullOrWhiteSpace(this.keyWord))
            {
                this.keyWord = this.keyWord.Trim();
            }
            this.hdfKeyword       = (HtmlInputHidden)this.FindControl("hdfKeyword");
            this.hdfKeyword.Value = this.keyWord;
            this.imgUrl           = (HiImage)this.FindControl("imgUrl");
            this.litContent       = (Literal)this.FindControl("litContent");
            this.rptProducts      = (VshopTemplatedRepeater)this.FindControl("rptProducts");
            this.rptCategories    = (VshopTemplatedRepeater)this.FindControl("rptCategories");
            this.rptCategoryList  = (VshopTemplatedRepeater)this.FindControl("rptCategoryList");
            this.txtTotalPages    = (HtmlInputHidden)this.FindControl("txtTotal");
            string sort = this.Page.Request.QueryString["sort"];

            if (string.IsNullOrWhiteSpace(sort))
            {
                sort = "DisplaySequence";
            }
            string order = this.Page.Request.QueryString["order"];

            if (string.IsNullOrWhiteSpace(order))
            {
                order = "desc";
            }
            if (!int.TryParse(this.Page.Request.QueryString["page"], out num2))
            {
                num2 = 1;
            }
            if (!int.TryParse(this.Page.Request.QueryString["size"], out num3))
            {
                num3 = 20;
            }
            IList <CategoryInfo> maxSubCategories = CategoryBrowser.GetMaxSubCategories(this.categoryId, 0x3e8);

            this.rptCategories.DataSource = maxSubCategories;
            this.rptCategories.DataBind();
            DataSet categoryList = CategoryBrowser.GetCategoryList();

            this.rptCategoryList.ItemDataBound += new RepeaterItemEventHandler(this.rptCategoryList_ItemDataBound);
            this.rptCategoryList.DataSource     = categoryList;
            this.rptCategoryList.DataBind();
            this.rptProducts.DataSource = ProductBrowser.GetProducts(MemberProcessor.GetCurrentMember(), null, new int?(this.categoryId), this.keyWord, num2, num3, out num4, sort, order, this.pIds, num == 1);
            this.rptProducts.DataBind();
            this.txtTotalPages.SetWhenIsNotNull(num4.ToString());
            string title = "商品列表";

            if (this.categoryId > 0)
            {
                CategoryInfo category = CategoryBrowser.GetCategory(this.categoryId);
                if (category != null)
                {
                    title = category.Name;
                }
            }
            PageTitle.AddSiteNameTitle(title);
        }