protected override void AttachChildControls() { if (!int.TryParse(this.Page.Request.QueryString["BrandId"], out this.BrandId)) { base.GotoResourceNotFound(""); } this.imgUrl = (HiImage)this.FindControl("imgUrl"); this.rptProducts = (VshopTemplatedRepeater)this.FindControl("rptProducts"); this.litBrandDetail = (System.Web.UI.WebControls.Literal) this.FindControl("litBrandDetail"); this.txtTotal = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("txtTotal"); BrandCategoryInfo brandCategory = CategoryBrowser.GetBrandCategory(this.BrandId); this.litBrandDetail.SetWhenIsNotNull(brandCategory.Description); this.imgUrl.ImageUrl = brandCategory.Logo; int pageNumber; if (!int.TryParse(this.Page.Request.QueryString["page"], out pageNumber)) { pageNumber = 1; } int maxNum; if (!int.TryParse(this.Page.Request.QueryString["size"], out maxNum)) { maxNum = 20; } int num; this.rptProducts.DataSource = ProductBrowser.GetBrandProducts(MemberProcessor.GetCurrentMember(), new int?(this.BrandId), pageNumber, maxNum, out num); this.rptProducts.DataBind(); this.txtTotal.SetWhenIsNotNull(num.ToString()); PageTitle.AddSiteNameTitle("品牌详情"); }
public BrandDetails() { int.TryParse(this.Page.Request.QueryString["brandId"], out this.brandId); BrandCategoryInfo brandCategory = CategoryBrowser.GetBrandCategory(this.brandId); if (((brandCategory != null) && !string.IsNullOrEmpty(brandCategory.Theme)) && File.Exists(HiContext.Current.Context.Request.MapPath(HiContext.Current.GetSkinPath() + "/brandcategorythemes/" + brandCategory.Theme))) { this.SkinName = "/brandcategorythemes/" + brandCategory.Theme; } }
protected override void AttachChildControls() { this.litBrandName = (System.Web.UI.WebControls.Literal) this.FindControl("litBrandName"); this.litBrandRemark = (System.Web.UI.WebControls.Literal) this.FindControl("litBrandRemark"); this.rptProducts = (ThemedTemplatedRepeater)this.FindControl("rptProducts"); this.pager = (Pager)this.FindControl("pager"); this.cutdownSearch = (Common_CutdownSearch)this.FindControl("search_Common_CutdownSearch"); this.btnSortPrice = (Common_Search_SortPrice)this.FindControl("btn_Common_Search_SortPrice"); this.btnSortTime = (Common_Search_SortTime)this.FindControl("btn_Common_Search_SortTime"); this.btnSortPopularity = (Common_Search_SortPopularity)this.FindControl("btn_Common_Search_SortPopularity"); this.btnSortSaleCounts = (Common_Search_SortSaleCounts)this.FindControl("btn_Common_Search_SortSaleCounts"); this.cutdownSearch.ReSearch += new Common_CutdownSearch.ReSearchEventHandler(this.cutdownSearch_ReSearch); this.btnSortPrice.Sorting += new Common_Search_SortTime.SortingHandler(this.btnSortPrice_Sorting); this.btnSortTime.Sorting += new Common_Search_SortTime.SortingHandler(this.btnSortTime_Sorting); this.hotSale = (Common_GoodsList_HotSale)this.FindControl("list_Common_GoodsList_HotSale");//销售排行 this.litSearchResultPage = (System.Web.UI.WebControls.Literal) this.FindControl("litSearchResultPage"); if (this.btnSortPopularity != null) { this.btnSortPopularity.Sorting += new Common_Search_SortPopularity.SortingHandler(this.btnSortPopularity_Sorting); } if (this.btnSortSaleCounts != null) { this.btnSortSaleCounts.Sorting += new Common_Search_SortSaleCounts.SortingHandler(this.btnSortSaleCounts_Sorting); } if (this.hotSale != null) { int cid = 0; int brandId = 0; if (!string.IsNullOrEmpty(this.Page.Request.QueryString["categoryId"])) { int.TryParse(this.Page.Request.QueryString["categoryId"], out cid); } if (!string.IsNullOrEmpty(this.Page.Request.QueryString["brand"])) { int.TryParse(this.Page.Request.QueryString["brand"], out brandId); } this.hotSale.DataSource = ProductBrowser.GetBrowseHotProductList(cid, brandId).DBHotSale; this.hotSale.DataBind(); } if (!this.Page.IsPostBack) { BrandCategoryInfo brandCategory = CategoryBrowser.GetBrandCategory(this.brandId); if (brandCategory == null) { this.Page.Response.Redirect(Globals.ApplicationPath + "/ResourceNotFound.aspx?errorMsg=" + Globals.UrlEncode("该品牌已经不存在")); return; } this.LoadCategoryHead(brandCategory); this.litBrandName.Text = brandCategory.BrandName; this.litBrandRemark.Text = brandCategory.Description; PageTitle.AddSiteNameTitle(brandCategory.BrandName); this.BindBrandProduct(); } }
public BrandDetails() { if (!int.TryParse(this.Page.Request.QueryString["brandId"], out this.brandId)) { base.GotoResourceNotFound(); } BrandCategoryInfo brandCategory = CategoryBrowser.GetBrandCategory(this.brandId); if (brandCategory != null && !string.IsNullOrEmpty(brandCategory.Theme) && System.IO.File.Exists(Hidistro.Membership.Context.HiContext.Current.Context.Request.MapPath(Hidistro.Membership.Context.HiContext.Current.GetSkinPath() + "/brandcategorythemes/" + brandCategory.Theme))) { this.SkinName = "/brandcategorythemes/" + brandCategory.Theme; } }
protected override void AttachChildControls() { if (!int.TryParse(this.Page.Request.QueryString["BrandId"], out this.BrandId)) { base.GotoResourceNotFound(""); } this.imgUrl = (HiImage)this.FindControl("imgUrl"); this.litBrandDetail = (System.Web.UI.WebControls.Literal) this.FindControl("litBrandDetail"); BrandCategoryInfo brandCategory = CategoryBrowser.GetBrandCategory(this.BrandId); this.litBrandDetail.SetWhenIsNotNull(brandCategory.Description); this.imgUrl.ImageUrl = brandCategory.Logo; PageTitle.AddSiteNameTitle("品牌详情"); }
protected override void AttachChildControls() { if (!int.TryParse(this.Page.Request.QueryString["BrandId"], out this.BrandId)) { base.GotoResourceNotFound(""); } this.imgUrl = (HiImage)this.FindControl("imgUrl"); this.rptProducts = (VshopTemplatedRepeater)this.FindControl("rptProducts"); this.litBrandDetail = (System.Web.UI.WebControls.Literal) this.FindControl("litBrandDetail"); this.txtTotal = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("txtTotal"); this.litContent = (System.Web.UI.WebControls.Literal) this.FindControl("litContent"); BrandCategoryInfo brandCategory = CategoryBrowser.GetBrandCategory(this.BrandId); this.litBrandDetail.SetWhenIsNotNull(brandCategory.Description); this.imgUrl.ImageUrl = brandCategory.Logo; int pageNumber; this.litContent.Text = brandCategory.BrandName; if (!int.TryParse(this.Page.Request.QueryString["page"], out pageNumber)) { pageNumber = 1; } int maxNum; if (!int.TryParse(this.Page.Request.QueryString["size"], out maxNum)) { maxNum = 20; } int num; ProductBrowseQuery query = new ProductBrowseQuery(); query.SortOrder = SortAction.Desc; query.SortBy = "DisplaySequence"; query.PageIndex = 1; query.PageSize = 12; //this.rptProducts.DataSource = ProductBrowser.GetBrandProducts(new int?(this.BrandId), pageNumber, maxNum, out num); DbQueryResult dataProducts = ProductBrowser.GetBrandProducts(new int?(this.BrandId), query); this.rptProducts.DataSource = dataProducts.Data; this.rptProducts.DataBind(); this.txtTotal.SetWhenIsNotNull(dataProducts.TotalRecords.ToString()); PageTitle.AddSiteNameTitle("品牌详情"); }
protected override void AttachChildControls() { this.litBrandName = (Literal)this.FindControl("litBrandName"); this.litBrandRemark = (Literal)this.FindControl("litBrandRemark"); this.rptProduct = (ThemedTemplatedRepeater)this.FindControl("rptProduct"); this.pager = (Pager)this.FindControl("pager"); this.litBrandProductResult = (Literal)this.FindControl("litBrandProductResult"); this.cutdownSearch = (Common_CutdownSearch)this.FindControl("search_Common_CutdownSearch"); this.btnSortPrice = (Common_Search_SortPrice)this.FindControl("btn_Common_Search_SortPrice"); this.btnSortTime = (Common_Search_SortTime)this.FindControl("btn_Common_Search_SortTime"); this.btnSortPopularity = (Common_Search_SortPopularity)this.FindControl("btn_Common_Search_SortPopularity"); this.btnSortSaleCounts = (Common_Search_SortSaleCounts)this.FindControl("btn_Common_Search_SortSaleCounts"); this.cutdownSearch.ReSearch += new Common_CutdownSearch.ReSearchEventHandler(this.cutdownSearch_ReSearch); this.btnSortPrice.Sorting += new Common_Search_SortTime.SortingHandler(this.btnSortPrice_Sorting); this.btnSortTime.Sorting += new Common_Search_SortTime.SortingHandler(this.btnSortTime_Sorting); if (this.btnSortPopularity != null) { this.btnSortPopularity.Sorting += new Common_Search_SortPopularity.SortingHandler(this.btnSortPopularity_Sorting); } if (this.btnSortSaleCounts != null) { this.btnSortSaleCounts.Sorting += new Common_Search_SortSaleCounts.SortingHandler(this.btnSortSaleCounts_Sorting); } if (!this.Page.IsPostBack) { int.TryParse(this.Page.Request.QueryString["brandId"], out this.brandId); BrandCategoryInfo brandCategory = CategoryBrowser.GetBrandCategory(this.brandId); if (brandCategory == null) { this.Page.Response.Redirect(Globals.ApplicationPath + "/ResourceNotFound.aspx?errorMsg=" + Globals.UrlEncode("该品牌已经不存在")); } else { this.LoadCategoryHead(brandCategory); this.litBrandName.Text = brandCategory.BrandName; this.litBrandRemark.Text = brandCategory.Description; PageTitle.AddTitle(brandCategory.BrandName, HiContext.Current.Context); this.BindBrandProduct(); } } }
protected void SetDesignSkinName() { if (string.IsNullOrEmpty(this.Page.Request.QueryString["skintemp"])) { base.GotoResourceNotFound(); } this.skintemp = this.Page.Request.QueryString["skintemp"]; string key; switch (key = this.skintemp) { case "default": this.SkinName = "Skin-Desig_Templete.html"; this.tempurl = Globals.PhysicalPath(HiContext.Current.GetSkinPath() + "/Skin-Default.html"); return; case "login": this.SkinName = "Skin-Desig_login.html"; this.tempurl = Globals.PhysicalPath(HiContext.Current.GetSkinPath() + "/Skin-Login.html"); return; case "brand": this.SkinName = "Skin-Desig_Brand.html"; this.tempurl = Globals.PhysicalPath(HiContext.Current.GetSkinPath() + "/Skin-Brand.html"); return; case "branddetail": this.SkinName = "Skin-Desig_BrandDetails.html"; this.tempurl = Globals.PhysicalPath(HiContext.Current.GetSkinPath() + "/Skin-BrandDetails.html"); return; case "product": this.SkinName = "Skin-Desig_SubCategory.html"; this.tempurl = Globals.PhysicalPath(HiContext.Current.GetSkinPath() + "/Skin-SubCategory.html"); return; case "productdetail": this.SkinName = "Skin-Desig_ProductDetails.html"; this.tempurl = Globals.PhysicalPath(HiContext.Current.GetSkinPath() + "/Skin-ProductDetails.html"); return; case "article": this.SkinName = "Skin-Desig_Articles.html"; this.tempurl = Globals.PhysicalPath(HiContext.Current.GetSkinPath() + "/Skin-Articles.html"); return; case "articledetail": this.SkinName = "Skin-Desig_ArticleDetails.html"; this.tempurl = Globals.PhysicalPath(HiContext.Current.GetSkinPath() + "/Skin-ArticleDetails.html"); return; case "cuountdown": this.SkinName = "Skin-Desig_CountDownProducts.html"; this.tempurl = Globals.PhysicalPath(HiContext.Current.GetSkinPath() + "/Skin-CountDownProducts.html"); return; case "cuountdowndetail": this.SkinName = "Skin-Desig_CountDownProductsDetails.html"; this.tempurl = Globals.PhysicalPath(HiContext.Current.GetSkinPath() + "/Skin-CountDownProductsDetails.html"); return; case "groupbuy": this.SkinName = "Skin-Desig_GroupBuyProducts.html"; this.tempurl = Globals.PhysicalPath(HiContext.Current.GetSkinPath() + "/Skin-GroupBuyProducts.html"); return; case "groupbuydetail": this.SkinName = "Skin-Desig_GroupBuyProductDetails.html"; this.tempurl = Globals.PhysicalPath(HiContext.Current.GetSkinPath() + "/Skin-GroupBuyProductDetails.html"); return; case "help": this.SkinName = "Skin-Desig_Helps.html"; this.tempurl = Globals.PhysicalPath(HiContext.Current.GetSkinPath() + "/Skin-Helps.html"); return; case "helpdetail": this.SkinName = "Skin-Desig_HelpDetails.html"; this.tempurl = Globals.PhysicalPath(HiContext.Current.GetSkinPath() + "/Skin-HelpDetails.html"); return; case "gift": this.SkinName = "Skin-Desig_OnlineGifts.html"; this.tempurl = Globals.PhysicalPath(HiContext.Current.GetSkinPath() + "/Skin-OnlineGifts.html"); return; case "giftdetail": this.SkinName = "Skin-Desig_GiftDetails.html"; this.tempurl = Globals.PhysicalPath(HiContext.Current.GetSkinPath() + "/Skin-GiftDetails.html"); return; case "shopcart": this.SkinName = "Skin-Desig_ShoppingCart.html"; this.tempurl = Globals.PhysicalPath(HiContext.Current.GetSkinPath() + "/Skin-ShoppingCart.html"); return; case "categorycustom": { int categoryId = 0; int.TryParse(this.Page.Request.QueryString["cid"], out categoryId); CategoryInfo category = CategoryBrowser.GetCategory(categoryId); this.skinparams = categoryId.ToString(); this.SkinName = "Skin-Desig_Custom.html"; this.tempurl = Globals.PhysicalPath(HiContext.Current.GetSkinPath() + "/categorythemes/" + category.Theme); return; } case "brandcustom": { this.SkinName = "Skin-Desig_Custom.html"; int brandId = 0; int.TryParse(this.Page.Request.QueryString["brandId"], out brandId); this.skinparams = brandId.ToString(); BrandCategoryInfo brandCategory = CategoryBrowser.GetBrandCategory(brandId); this.tempurl = Globals.PhysicalPath(HiContext.Current.GetSkinPath() + "/brandcategorythemes/" + brandCategory.Theme); return; } case "customthemes": { this.SkinName = "Skin-Desig_Custom.html"; int tid = 0; int.TryParse(this.Page.Request.QueryString["tid"], out tid); this.skinparams = tid.ToString(); this.tempurl = Globals.PhysicalPath(HiContext.Current.GetSkinPath() + "/customthemes/" + this.GetCustomSkinName(tid)); return; } } this.SkinName = null; }
protected override void AttachChildControls() { if (CustomConfigHelper.Instance.BrandShow) { #region 卡拉萌购特殊需求 int num; int num2; int num3; int.TryParse(this.Page.Request.QueryString["BrandId"], out this.BrandId); this.keyWord = this.Page.Request.QueryString["keyWord"]; 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.rptBrandShow = (VshopTemplatedRepeater)this.FindControl("rptBrandShow"); 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 <BrandCategoryInfo> maxSubCategories = CategoryBrowser.GetBrandCategory(this.BrandId, 0x3e8); this.rptBrandShow.DataSource = maxSubCategories; this.rptBrandShow.DataBind(); string swr = ""; DataTable dt = null; if (!string.IsNullOrWhiteSpace(this.Page.Request.QueryString["TypeId"])) { int typeID = Convert.ToInt32(this.Page.Request.QueryString["TypeId"]); if (typeID == 1) { swr = " CategoryId in (1,2,3,4)"; dt = ProductBrowser.GetProducts(MemberProcessor.GetCurrentMember(), null, 0, null, this.keyWord, num, num2, out num3, str, str2, swr); } else { swr = " CategoryId in (select CategoryId from Hishop_Categories where AssociatedProductType=" + typeID + ")"; dt = ProductBrowser.GetProducts(MemberProcessor.GetCurrentMember(), null, 0, null, this.keyWord, num, num2, out num3, str, str2, swr); } } else { dt = ProductBrowser.GetProducts(MemberProcessor.GetCurrentMember(), null, this.BrandId, null, this.keyWord, num, num2, out num3, str, str2); } this.rptProducts.DataSource = dt; this.rptProducts.DataBind(); this.txtTotalPages.SetWhenIsNotNull(num3.ToString()); PageTitle.AddSiteNameTitle("分类搜索页"); #endregion } else { #region int num; int num2; int num3; int.TryParse(this.Page.Request.QueryString["categoryId"], out this.categoryId); this.keyWord = this.Page.Request.QueryString["keyWord"]; 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.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.GetMaxSubCategoriesRange(this.categoryId, 0x3e8); this.rptCategories.DataSource = maxSubCategories; this.rptCategories.DataBind(); string swr = ""; DataTable dt = null; if (!string.IsNullOrWhiteSpace(this.Page.Request.QueryString["TypeId"])) { int typeID = Convert.ToInt32(this.Page.Request.QueryString["TypeId"]); if (typeID == 1) { swr = " CategoryId in (1,2,3,4)"; dt = ProductBrowser.GetProducts(MemberProcessor.GetCurrentMember(), null, 0, null, this.keyWord, num, num2, out num3, str, str2, swr); } else { swr = " CategoryId in (select CategoryId from Hishop_Categories where AssociatedProductType=" + typeID + ")"; dt = ProductBrowser.GetProducts(MemberProcessor.GetCurrentMember(), null, 0, null, this.keyWord, num, num2, out num3, str, str2, swr); } } else { dt = ProductBrowser.GetProducts(MemberProcessor.GetCurrentMember(), null, 0, new int?(this.categoryId), this.keyWord, num, num2, out num3, str, str2); } this.rptProducts.DataSource = dt; this.rptProducts.DataBind(); this.txtTotalPages.SetWhenIsNotNull(num3.ToString()); PageTitle.AddSiteNameTitle("分类搜索页"); #endregion } }