private void RendeBrand(StringBuilder stringBuilder_0) { DataTable brandCategories = CategoryBrowser.GetBrandCategories(this.categoryId, 1000); if (brandCategories != null && brandCategories.Rows.Count > 0) { stringBuilder_0.AppendLine("<dl class=\"attribute_dl\">"); stringBuilder_0.AppendLine("<dt class=\"attribute_name\">品牌:</dt>"); stringBuilder_0.AppendLine("<dd class=\"attribute_val\">"); stringBuilder_0.AppendLine("<div class=\"h_chooselist\">"); string text = "all"; if (this.brandId == 0) { text += " select"; } stringBuilder_0.AppendFormat("<a class=\"{0}\" href=\"{1}\" >全部</a>", text, this.CreateUrl("brand", "")).AppendLine(); foreach (DataRow dataRow in brandCategories.Rows) { text = string.Empty; if (this.brandId == (int)dataRow["BrandId"]) { text += " select"; } stringBuilder_0.AppendFormat("<a class=\"{0}\" href=\"{1}\" >{2}</a>", text, this.CreateUrl("brand", dataRow["BrandId"].ToString()), dataRow["BrandName"]).AppendLine(); } stringBuilder_0.AppendLine("</div>"); stringBuilder_0.AppendLine("</dd>"); stringBuilder_0.AppendLine("</dl>"); } }
private void RenderHeader(XmlNode node, StringBuilder stringBuilder_0) { stringBuilder_0.AppendLine("<div class=\"floor_hd\">"); stringBuilder_0.AppendLine("<div>"); if (!string.IsNullOrEmpty(node.Attributes["ImageTitle"].Value)) { stringBuilder_0.AppendFormat("<span class=\"icon\"><img src=\"{0}\" /></span>", Globals.ApplicationPath + node.Attributes["ImageTitle"].Value); } if (!string.IsNullOrEmpty(node.Attributes["Title"].Value)) { stringBuilder_0.AppendFormat("<span class=\"title\">{0}</span>", node.Attributes["Title"].Value); } stringBuilder_0.AppendLine("</div>"); int num = 0; if (int.TryParse(node.Attributes["CategoryId"].Value, out num)) { IList <CategoryInfo> maxSubCategories = CategoryBrowser.GetMaxSubCategories(num, int.Parse(node.Attributes["SubCategoryNum"].Value)); if (maxSubCategories != null && maxSubCategories.Count > 0) { stringBuilder_0.AppendLine("<ul>"); foreach (CategoryInfo current in maxSubCategories) { stringBuilder_0.AppendFormat("<li><a href=\"{0}\">{1}</a></li>", Globals.GetSiteUrls().SubCategory(current.CategoryId, current.RewriteName), current.Name).AppendLine(""); } stringBuilder_0.AppendLine("</ul>"); } if (node.Attributes["IsShowMoreLink"].Value == "true") { stringBuilder_0.AppendFormat("<em><a href=\"{0}\">更多>></a></em>", Globals.GetSiteUrls().SubCategory(num, null)).AppendLine(); } } stringBuilder_0.AppendLine("</div>"); }
public string RendHtml() { XmlNode xmlNode = TagsHelper.FindCommentNode(this.CommentId, "category"); StringBuilder stringBuilder = new StringBuilder(); if (xmlNode != null) { stringBuilder.AppendFormat("<div class=\"category cssEdite\" type=\"category\" id=\"comments_{0}\" >", this.CommentId).AppendLine(); int parentCategoryId = 0; int maxNum = 0; int.TryParse(xmlNode.Attributes["CategoryId"].Value, out parentCategoryId); int.TryParse(xmlNode.Attributes["MaxNum"].Value, out maxNum); IList <CategoryInfo> maxSubCategories = CategoryBrowser.GetMaxSubCategories(parentCategoryId, maxNum); if (maxSubCategories != null && maxSubCategories.Count > 0) { stringBuilder.AppendLine("<ul>"); foreach (CategoryInfo current in maxSubCategories) { stringBuilder.AppendFormat("<li><a target=\"_blank\" href=\"{0}\">{1}</a></li>", Globals.GetSiteUrls().SubCategory(current.CategoryId, current.RewriteName), current.Name).AppendLine(); } stringBuilder.AppendLine("</ul>"); } stringBuilder.AppendLine("</div>"); } return(stringBuilder.ToString()); }
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.imgUrl = (HiImage)this.FindControl("imgUrl"); this.litContent = (Literal)this.FindControl("litContent"); this.rptProducts = (VshopTemplatedRepeater)this.FindControl("rptGroupBuyProducts"); this.txtTotal = (HtmlInputHidden)this.FindControl("txtTotal"); this.rptCategories = (VshopTemplatedRepeater)this.FindControl("rptCategories"); if (this.rptCategories != null) { IList <CategoryInfo> maxSubCategories = CategoryBrowser.GetMaxSubCategories(this.categoryId, 0x3e8); this.rptCategories.DataSource = maxSubCategories; this.rptCategories.DataBind(); } if (!int.TryParse(this.Page.Request.QueryString["page"], out num)) { num = 1; } if (!int.TryParse(this.Page.Request.QueryString["size"], out num2)) { num2 = 10; } this.rptProducts.DataSource = GroupBuyBrowser.GetGroupBuyProducts(new int?(this.categoryId), this.keyWord, num, num2, out num3, true); this.rptProducts.DataBind(); this.txtTotal.SetWhenIsNotNull(num3.ToString()); PageTitle.AddSiteNameTitle("团购搜索页"); }
protected override void Render(HtmlTextWriter writer) { StringBuilder stringBuilder = new StringBuilder(); if (!string.IsNullOrEmpty(this.CateGoryPath)) { string[] array = this.CateGoryPath.Split(new char[] { '|' }); string[] array2 = array; for (int i = 0; i < array2.Length; i++) { string s = array2[i]; CategoryInfo category = CategoryBrowser.GetCategory(int.Parse(s)); if (category != null) { stringBuilder.AppendFormat("<a href ='{0}'>{1}</a>{2}", Globals.GetSiteUrls().SubCategory(category.CategoryId, category.RewriteName), category.Name, this.SeparatorString); } } string text = stringBuilder.ToString(); if (!string.IsNullOrEmpty(this.ProductName)) { text += this.ProductName; } else { if (text.Length > this.SeparatorString.Length) { text = text.Remove(text.Length - this.SeparatorString.Length); } } writer.Write(text); } }
protected override void AttachChildControls() { int.TryParse(this.Page.Request.QueryString["categoryId"], out this.categoryId); this.keyWord = System.Web.HttpUtility.UrlDecode(this.Page.Request.QueryString["keyWord"]); if (!string.IsNullOrWhiteSpace(this.keyWord)) { this.keyWord = this.keyWord.Trim(); if (HiContext.Current.User.UserId > 0) { HistorySearchHelp.NewSearchHistory(this.keyWord.Trim(), HiContext.Current.User.UserId, Entities.ClientType.WAP); } } this.imgUrl = (HiImage)this.FindControl("imgUrl"); this.litContent = (System.Web.UI.WebControls.Literal) this.FindControl("litContent"); //this.rptCategories = (WapTemplatedRepeater)this.FindControl("rptCategories"); this.txtSearch = (System.Web.UI.HtmlControls.HtmlAnchor) this.FindControl("txtSearch"); if (this.categoryId > 0) { this.txtSearch.InnerText = CategoryBrowser.GetCategory(this.categoryId).Name; } else if (!string.IsNullOrWhiteSpace(this.keyWord)) { this.txtSearch.InnerText = this.keyWord; } //System.Collections.Generic.IList<CategoryInfo> maxSubCategories = CategoryBrowser.GetMaxSubCategories(this.categoryId, 1000); //this.rptCategories.DataSource = maxSubCategories; //this.rptCategories.DataBind(); //this.txtTotalPages.SetWhenIsNotNull(num.ToString()); PageTitle.AddSiteNameTitle("分类搜索页"); }
protected override void AttachChildControls() { int.TryParse(this.Page.Request.QueryString["categoryId"], out this.categoryId); this.keyWord = this.Page.Request.QueryString["keyWord"]; this.imgUrl = (HiImage)this.FindControl("imgUrl"); this.litContent = (System.Web.UI.WebControls.Literal) this.FindControl("litContent"); this.rptProducts = (VshopTemplatedRepeater)this.FindControl("rptCountDownProducts"); this.txtTotal = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("txtTotal"); this.rptCategories = (VshopTemplatedRepeater)this.FindControl("rptCategories"); if (this.rptCategories != null) { System.Collections.Generic.IList <CategoryInfo> maxSubCategories = CategoryBrowser.GetMaxSubCategories(this.categoryId, 1000); this.rptCategories.DataSource = maxSubCategories; this.rptCategories.DataBind(); } int page; if (!int.TryParse(this.Page.Request.QueryString["page"], out page)) { page = 1; } int size; if (!int.TryParse(this.Page.Request.QueryString["size"], out size)) { size = 10; } int num; DataTable countDownProductList = ProductBrowser.GetCountDownProductList(new int?(this.categoryId), this.keyWord, page, size, out num, true); this.rptProducts.DataSource = countDownProductList; this.rptProducts.DataBind(); this.txtTotal.SetWhenIsNotNull(num.ToString()); PageTitle.AddSiteNameTitle("限时抢购"); }
protected override void AttachChildControls() { int.TryParse(this.Page.Request.QueryString["categoryId"], out this.categoryId); this.keyWord = this.Page.Request.QueryString["keyWord"]; //this.rptProducts = (VshopTemplatedRepeater)this.FindControl("rptProducts"); this.rptCategories = (VshopTemplatedRepeater)this.FindControl("rptCategories"); this.litCategoryId = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("litCategoryId"); this.litCategoryId.SetWhenIsNotNull(this.categoryId.ToString()); MemberInfo currentMember = MemberProcessor.GetCurrentMember(); if (currentMember == null) { this.Page.Response.Redirect("UserLogin.aspx"); } HttpCookie cookie = HttpContext.Current.Request.Cookies["Vshop-ReferralId"]; int ReferralUserId = 0; if ((cookie != null) && !string.IsNullOrEmpty(cookie.Value)) { ReferralUserId = Convert.ToInt32(cookie.Value); } Hidistro.Core.HiCache.Remove("DataCache-CategoriesRange");//清除分类缓存 //获取手机端所有商品的分类 DataTable dt = CategoryBrowser.GetCategoriesByRange(2); this.rptCategories.DataSource = dt; this.rptCategories.DataBind(); }
private void recordsone_ItemDataBound(object sender, RepeaterItemEventArgs e) { Control control = e.Item.Controls[0]; Repeater repeater = (Repeater)control.FindControl("recordstwo"); HtmlInputHidden htmlInputHidden = (HtmlInputHidden)control.FindControl("hidMainCategoryId"); int mainCategoryId = int.Parse(htmlInputHidden.Value); Repeater repeater2 = (Repeater)control.FindControl("recordsbrands"); Repeater repeater3 = (Repeater)control.FindControl("rphotkey"); Repeater recordTwoCategory = (Repeater)control.FindControl("recordTwoCategory"); Repeater recordtwoHotBuyProduct = (Repeater)control.FindControl("recordtwoHotBuyProduct"); repeater2.DataSource = CategoryBrowser.GetBrandCategories(mainCategoryId, 12); repeater2.DataBind(); repeater.DataSource = CategoryBrowser.GetMaxSubCategories(mainCategoryId, 0, 1000); repeater.DataBind(); if (repeater3 != null) { repeater3.DataSource = CommentBrowser.GetHotKeywords(mainCategoryId, 12); repeater3.DataBind(); } if (recordTwoCategory != null) { recordTwoCategory.DataSource = CategoryBrowser.GetMaxSubCategories(mainCategoryId, 0, 1000); recordTwoCategory.DataBind(); } if (recordtwoHotBuyProduct != null) { recordtwoHotBuyProduct.DataSource = ProductBrowser.GetHotBuyProduct(mainCategoryId); recordtwoHotBuyProduct.DataBind(); } }
protected void Page_Load(object sender, System.EventArgs e) { if (!this.Page.IsPostBack) { this.cboxCategory.DataSource = CategoryBrowser.GetAllCategories(); this.cboxCategory.DataTextField = "Name"; this.cboxCategory.DataValueField = "CategoryId"; this.cboxCategory.DataBind(); this.cboxBrand.DataSource = CategoryBrowser.GetBrandCategories(); this.cboxBrand.DataTextField = "BrandName"; this.cboxBrand.DataValueField = "BrandId"; this.cboxBrand.DataBind(); this.cboxType.DataSource = ProductTypeHelper.GetProductTypes(); this.cboxType.DataTextField = "TypeName"; this.cboxType.DataValueField = "TypeId"; this.cboxType.DataBind(); DataTable dtData = DistributorsBrower.GetDistributorProductRangeByUserid(int.Parse(Request.QueryString["UserID"])); if (dtData.Rows.Count > 0) { string strs = string.Empty; if (dtData.Rows[0]["ProductRange1"] != DBNull.Value) { strs = "," + dtData.Rows[0]["ProductRange1"].ToString().Trim() + ","; foreach (ListItem li in this.cboxCategory.Items) { if (strs.IndexOf(li.Value) > -1) { li.Selected = true; } } } if (dtData.Rows[0]["ProductRange2"] != DBNull.Value) { strs = "," + dtData.Rows[0]["ProductRange2"].ToString().Trim() + ","; foreach (ListItem li in this.cboxBrand.Items) { if (strs.IndexOf(li.Value) > -1) { li.Selected = true; } } } if (dtData.Rows[0]["ProductRange3"] != DBNull.Value) { strs = "," + dtData.Rows[0]["ProductRange3"].ToString().Trim() + ","; foreach (ListItem li in this.cboxType.Items) { if (strs.IndexOf(li.Value) > -1) { li.Selected = true; } } } } ViewState["dtData"] = dtData; } }
public string RendHtml() { XmlNode node = TagsHelper.FindCommentNode(this.CommentId, "keyword"); StringBuilder builder = new StringBuilder(); if (node != null) { int categoryId = 0; int result = 0; int num3 = 0; int.TryParse(node.Attributes["CategoryId"].Value, out result); int.TryParse(node.Attributes["MaxNum"].Value, out num3); CategoryInfo category = CategoryBrowser.GetCategory(result); if (category != null) { categoryId = category.TopCategoryId; } DataTable hotKeywords = CommentBrowser.GetHotKeywords(categoryId, num3); builder.AppendFormat("<ul class=\"keyword cssEdite\" type=\"keyword\" id=\"comments_{0}\" >", this.CommentId).AppendLine(); if ((hotKeywords != null) && (hotKeywords.Rows.Count > 0)) { foreach (DataRow row in hotKeywords.Rows) { builder.AppendFormat("<li><a target=\"_blank\" href=\"{0}\">{1}</a></li>", Globals.GetSiteUrls().SubCategory((int)row["CategoryId"], null) + "?keywords=" + Globals.UrlEncode((string)row["Keywords"]), row["Keywords"]).AppendLine(); } } builder.AppendLine("</ul>"); } return(builder.ToString()); }
protected override void AttachChildControls() { this.rptBrands = (WapTemplatedRepeater)this.FindControl("rptBrands"); this.rptBrands.DataSource = CategoryBrowser.GetBrandCategories(0, 1000); this.rptBrands.DataBind(); PageTitle.AddSiteNameTitle("品牌列表"); }
private Literal lblKeyWord; //搜索内容 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"]; if (!string.IsNullOrWhiteSpace(this.keyWord)) { this.keyWord = this.keyWord.Trim(); } this.imgUrl = (HiImage)this.FindControl("imgUrl"); this.litContent = (Literal)this.FindControl("litContent"); this.hdProductList = (Literal)this.FindControl("hdProductList"); this.rptCategories = (VshopTemplatedRepeater)this.FindControl("rptCategories"); this.txtTotalPages = (HtmlInputHidden)this.FindControl("txtTotal"); this.lblSortFiled = (Literal)this.FindControl("lblSortFiled"); this.lblSortDirection = (Literal)this.FindControl("lblSortDirection"); this.lblKeyWord = (Literal)this.FindControl("lblKeyWord"); 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"; } this.lblSortFiled.Text = str; this.lblSortDirection.Text = str2; if (!int.TryParse(this.Page.Request.QueryString["page"], out num)) { num = 1; } if (!int.TryParse(this.Page.Request.QueryString["size"], out num2)) { num2 = 50; } IList <CategoryInfo> maxSubCategories = CategoryBrowser.GetMaxMainCategories(100); this.rptCategories.DataSource = maxSubCategories; this.rptCategories.DataBind(); lblKeyWord.Text = keyWord; DataTable dt = ProductBrowser.GetProducts(MemberProcessor.GetCurrentMember(), null, new int?(this.categoryId), this.keyWord, num, num2, out num3, str, str2); this.hdProductList.Text = JsonConvert.SerializeObject(dt); this.txtTotalPages.SetWhenIsNotNull(num3.ToString()); 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"); 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 string RendHtml() { XmlNode node = TagsHelper.FindCommentNode(this.CommentId, "category"); StringBuilder builder = new StringBuilder(); if (node != null) { builder.AppendFormat("<div class=\"category cssEdite\" type=\"category\" id=\"comments_{0}\" >", this.CommentId).AppendLine(); int result = 0; int num2 = 0; int.TryParse(node.Attributes["CategoryId"].Value, out result); int.TryParse(node.Attributes["MaxNum"].Value, out num2); IList <CategoryInfo> maxSubCategories = CategoryBrowser.GetMaxSubCategories(result, num2); if ((maxSubCategories != null) && (maxSubCategories.Count > 0)) { builder.AppendLine("<ul>"); foreach (CategoryInfo info in maxSubCategories) { builder.AppendFormat("<li><a target=\"_blank\" href=\"{0}\">{1}</a></li>", Globals.GetSiteUrls().SubCategory(info.CategoryId, info.RewriteName), info.Name).AppendLine(); } builder.AppendLine("</ul>"); } builder.AppendLine("</div>"); } return(builder.ToString()); }
protected override void AttachChildControls() { if (!int.TryParse(this.Page.Request.QueryString["categoryId"], out this.categoryId)) { base.GotoResourceNotFound(); } this.litLeadBuy = (Common_CategoryLeadBuy)this.FindControl("Common_CategoryLeadBuy"); if (!this.Page.IsPostBack) { CategoryInfo category = CategoryBrowser.GetCategory(this.categoryId); if (category != null) { if (!string.IsNullOrEmpty(category.MetaKeywords)) { MetaTags.AddMetaKeywords(category.MetaKeywords, HiContext.Current.Context); } if (!string.IsNullOrEmpty(category.MetaDescription)) { MetaTags.AddMetaDescription(category.MetaDescription, HiContext.Current.Context); } if (!string.IsNullOrEmpty(category.Name)) { PageTitle.AddTitle(category.MetaTitle, HiContext.Current.Context); } if (this.litLeadBuy != null) { this.litLeadBuy.Text = category.Notes1; } } this.LoadPageSearch(category); } base.AttachChildControls(); }
protected override void Render(HtmlTextWriter writer) { StringBuilder builder = new StringBuilder(); if (!string.IsNullOrEmpty(this.CateGoryPath)) { foreach (string str in this.CateGoryPath.Split(new char[] { '|' })) { CategoryInfo category = CategoryBrowser.GetCategory(int.Parse(str)); if (category != null) { builder.AppendFormat("<a href ='{0}'>{1}</a>{2}", Globals.GetSiteUrls().SubCategory(category.CategoryId, category.RewriteName), category.Name, this.SeparatorString); } } string str2 = builder.ToString(); if (!string.IsNullOrEmpty(this.ProductName)) { str2 = str2 + this.ProductName; } else if (str2.Length > this.SeparatorString.Length) { str2 = str2.Remove(str2.Length - this.SeparatorString.Length); } writer.Write(str2); } }
private void BindList() { if (this.categoryId != 0) { IList <CategoryInfo> maxSubCategories = CategoryBrowser.GetMaxSubCategories(this.categoryId, this.MaxNum); if (maxSubCategories.Count <= 0) { CategoryInfo category = CategoryBrowser.GetCategory(this.categoryId); if (category == null) { return; } int?parentCategoryId = category.ParentCategoryId; if (parentCategoryId.HasValue) { this.categoryId = parentCategoryId.Value; } maxSubCategories = CategoryBrowser.GetMaxSubCategories(this.categoryId, this.MaxNum); } base.DataSource = maxSubCategories; base.DataBind(); return; } base.DataSource = CategoryBrowser.GetMaxMainCategories(this.MaxNum); base.DataBind(); }
private void RendeBrand(StringBuilder sb) { DataTable brandCategories = CategoryBrowser.GetBrandCategories(this.categoryId, 0x3e8); if ((brandCategories != null) && (brandCategories.Rows.Count > 0)) { sb.AppendLine("<dl class=\"attribute_dl\">"); sb.AppendLine("<dt class=\"attribute_name\">品牌:</dt>"); sb.AppendLine("<dd class=\"attribute_val\">"); sb.AppendLine("<div class=\"h_chooselist\">"); string str = "all"; if (this.brandId == 0) { str = str + " select"; } sb.AppendFormat("<a class=\"{0}\" href=\"{1}\" >全部</a>", str, this.CreateUrl("brand", "")).AppendLine(); foreach (DataRow row in brandCategories.Rows) { str = string.Empty; if (this.brandId == ((int)row["BrandId"])) { str = str + " select"; } sb.AppendFormat("<a class=\"{0}\" href=\"{1}\" >{2}</a>", str, this.CreateUrl("brand", row["BrandId"].ToString()), row["BrandName"]).AppendLine(); } sb.AppendLine("</div>"); sb.AppendLine("</dd>"); sb.AppendLine("</dl>"); } }
protected override void OnInit(EventArgs e) { base.OnInit(e); if (this._categoryid > 0) { this._rewritename = CategoryBrowser.GetCategory(this._categoryid).RewriteName; } }
protected override void AttachChildControls() { MemberProcessor.GetCurrentMember(); this.rptBrands = (VshopTemplatedRepeater)this.FindControl("rptBrands"); this.rptBrands.DataSource = CategoryBrowser.GetBrandCategories(); this.rptBrands.DataBind(); PageTitle.AddSiteNameTitle("品牌列表"); }
void recordstwo_ItemDataBound(object sender, RepeaterItemEventArgs e) { Control control = e.Item.Controls[0]; Repeater repeater = (Repeater)control.FindControl("recordsthree"); HtmlInputHidden hidden = (HtmlInputHidden)control.FindControl("hidTwoCategoryId"); repeater.DataSource = CategoryBrowser.SearchCategories(int.Parse(hidden.Value), null); repeater.DataBind(); }
private void InitDataByTheme() { switch (SettingsManager.GetMasterSettings(true).VTheme.ToLower()) { case "underwear": //内衣 this.ShopName = (Literal)this.FindControl("ShopName"); if (Globals.GetCurrentDistributorId() != 0) { this.ShopName.Text = DistributorsBrower.GetDistributorInfo(Globals.GetCurrentDistributorId()).StoreName; } if (this.imglogo.ImageUrl.Equals("/Utility/pics/headLogo.jpg")) { this.imglogo.ImageUrl = "/Templates/vshop/underwear/images/LOGO.jpg"; } this.rptCategories1 = (VshopTemplatedRepeater)this.FindControl("rptCategories1"); this.rptCategories1.DataSource = CategoryBrowser.GetCategoriesByPruductType(4, 2); //根据ProductType查询分类 this.rptCategories1.DataBind(); this.rptCategories2 = (VshopTemplatedRepeater)this.FindControl("rptCategories2"); this.rptCategories3 = (VshopTemplatedRepeater)this.FindControl("rptCategories3"); this.rptCategories3.DataSource = CategoryBrowser.GetCategoriesByPruductType(12, 1); //根据ProductType查询分类 this.rptCategories3.DataBind(); this.rptCategories4 = (VshopTemplatedRepeater)this.FindControl("rptCategories4"); this.rptCategories4.DataSource = CategoryBrowser.GetCategoriesByPruductType(11, 4); //根据ProductType查询分类 this.rptCategories4.DataBind(); this.rptProductqqg = (VshopTemplatedRepeater)this.FindControl("rptProductqqg"); ProductQuery query = new ProductQuery { PageSize = 6, PageIndex = 1, SortBy = "ShowSaleCounts", SortOrder = SortAction.Desc, TypeId = 2 }; this.rptProductqqg.DataSource = ProductBrowser.GetHomeProduct(MemberProcessor.GetCurrentMember(), query).Data; this.rptProductqqg.DataBind(); DataTable dt = ProductBrowser.GetHomeProductTop(0, ProductInfo.ProductTop.New); this.ProductCount = (Literal)this.FindControl("ProductCount"); ProductCount.Text = dt.Rows[0][0] + ""; this.Gonggao = (Literal)this.FindControl("Gonggao"); IList <ArticleInfo> artlist = CommentBrowser.GetArticleList(4, 1); if (artlist.Count > 0) { this.Gonggao.Text = artlist[0].Content; } this.Erweima = (Literal)this.FindControl("Erweima"); if (Globals.GetCurrentDistributorId() == 0) { this.Erweima.Text = "<li><a href='QRcode.aspx?ReferralId='><i><img src='/Templates/vshop/underwear/images/iconfont-erweima.png' /></i><p>二维码</p></a></li>"; } else { this.Erweima.Text = "<li><a href='QRcode.aspx?ReferralId=" + Globals.GetCurrentDistributorId() + "'><i><img src='/Templates/vshop/underwear/images/iconfont-erweima.png' /></i><p>二维码</p></a></li>"; } break; } ; }
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.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("商品分类"); }
public override void DataBind() { this.Items.Clear(); this.Items.Add(new System.Web.UI.WebControls.ListItem(this.NullToDisplay, string.Empty)); System.Collections.Generic.IList <CategoryInfo> sequenceCategories = CategoryBrowser.GetSequenceCategories(); for (int i = 0; i < sequenceCategories.Count; i++) { this.Items.Add(new System.Web.UI.WebControls.ListItem(this.FormatDepth(sequenceCategories[i].Depth, Globals.HtmlDecode(sequenceCategories[i].Name)), sequenceCategories[i].CategoryId.ToString(System.Globalization.CultureInfo.InvariantCulture))); } }
public SubCategory() { int.TryParse(this.Page.Request.QueryString["CategoryId"], out this.categoryId); CategoryInfo category = CategoryBrowser.GetCategory(this.categoryId); if (((category != null) && (category.Depth == 1)) && (!string.IsNullOrEmpty(category.Theme) && File.Exists(HiContext.Current.Context.Request.MapPath(HiContext.Current.GetSkinPath() + "/categorythemes/" + category.Theme)))) { this.SkinName = "/categorythemes/" + category.Theme; } }
private void DataBindSoruce() { int num; this.txtkeywords.Value = this.keyWord; this.rpCategorys.DataSource = CategoryBrowser.GetCategories(wid); this.rpCategorys.DataBind(); this.rpChooseProducts.DataSource = ProductBrowser.GetProducts(MemberProcessor.GetCurrentMember(), null, new int?(this.categoryId), this.keyWord, 1, 10, out num, "DisplaySequence", "desc", true); this.rpChooseProducts.DataBind(); }
public Search_Class() { this.Items.Clear(); this.Items.Add(new ListItem(this.NullToDisplay, string.Empty)); foreach (CategoryInfo info in CategoryBrowser.GetMainCategories()) { this.Items.Add(new ListItem(Globals.HtmlDecode(info.Name), info.CategoryId.ToString(CultureInfo.InvariantCulture))); } base.ID = "drop_Search_Class"; }
protected override void AttachChildControls() { this.rptCategories = (ThemedTemplatedRepeater)this.FindControl("rptCategories"); if (!this.Page.IsPostBack) { DataSet threeLayerCategories = CategoryBrowser.GetThreeLayerCategories(); this.rptCategories.DataSource = threeLayerCategories.Tables[0].DefaultView; this.rptCategories.DataBind(); } }