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(); }
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); } }
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(); }
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() { 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 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 OnInit(EventArgs e) { base.OnInit(e); if (this._categoryid > 0) { this._rewritename = CategoryBrowser.GetCategory(this._categoryid).RewriteName; } }
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; } }
protected override void OnLoad(EventArgs e) { int.TryParse(this.Page.Request.QueryString["CategoryId"], out this.categoryId); CategoryInfo category = CategoryBrowser.GetCategory(this.categoryId); if (category != null) { this.topCategoryId = category.TopCategoryId; } base.DataSource = CommentBrowser.GetHotKeywords(this.topCategoryId, this.MaxNum); base.DataBind(); }
protected string GetCategoryName(object ocategoryid) { string name = "全部"; int num = 0; int.TryParse(ocategoryid.ToString(), out num); CategoryInfo category = CategoryBrowser.GetCategory(num); if (category != null) { name = category.Name; } return(name); }
public string RendHtml() { StringBuilder stringBuilder = new StringBuilder(); XmlNode xmlNode = TagsHelper.FindCommentNode(this.CommentId, "attribute"); if (xmlNode != null) { stringBuilder.AppendFormat("<div class=\"attribute_bd cssEdite\" type=\"attribute\" id=\"comments_{0}\" >", this.CommentId).AppendLine(); int categoryId = 0; int num = 0; int.TryParse(xmlNode.Attributes["CategoryId"].Value, out categoryId); int.TryParse(xmlNode.Attributes["MaxNum"].Value, out num); string rewriteName = null; CategoryInfo category = CategoryBrowser.GetCategory(categoryId); if (category != null) { rewriteName = category.RewriteName; } IList <AttributeInfo> attributeInfoByCategoryId = CategoryBrowser.GetAttributeInfoByCategoryId(categoryId, 1000); if (attributeInfoByCategoryId != null && attributeInfoByCategoryId.Count > 0) { foreach (AttributeInfo current in attributeInfoByCategoryId) { stringBuilder.AppendLine("<dl class=\"attribute_dl\">"); stringBuilder.AppendFormat("<dt class=\"attribute_name\">{0}:</dt>", current.AttributeName).AppendLine(); stringBuilder.AppendLine("<dd class=\"attribute_val\">"); stringBuilder.AppendLine("<div class=\"h_chooselist\">"); foreach (AttributeValueInfo current2 in current.AttributeValues) { stringBuilder.AppendFormat("<a href=\"{0}\" >{1}</a>", string.Concat(new object[] { Globals.GetSiteUrls().SubCategory(categoryId, rewriteName), "?valueStr=", current2.AttributeId, "_", current2.ValueId }), current2.ValueStr).AppendLine(); } stringBuilder.AppendLine("</div>"); stringBuilder.AppendLine("</dd>"); stringBuilder.AppendLine("</dl>"); } } stringBuilder.AppendLine("</div>"); } return(stringBuilder.ToString()); }
//txt_Search_Keywords 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) && System.IO.File.Exists(HiContext.Current.Context.Request.MapPath(HiContext.Current.GetSkinPath() + "/categorythemes/" + category.Theme))) { this.SkinName = "/categorythemes/" + category.Theme; } //输出javascript string script = string.Format("<script>$('#SubCategory_ctl00___SiteUrl5').html('{0}');</script>", category == null ? "商品分类" : category.Name); ClientScriptManager clientScript = this.Page.ClientScript; if (!clientScript.IsClientScriptBlockRegistered("SubCategoryScript")) { clientScript.RegisterClientScriptBlock(base.GetType(), "SubCategoryScript", script); } }
private void RenderHeader(XmlNode node, StringBuilder stringBuilder_0) { stringBuilder_0.AppendLine("<div class=\"group_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>"); CategoryInfo category; for (category = CategoryBrowser.GetCategory(this.categoryId); category != null; category = CategoryBrowser.GetCategory(this.categoryId)) { if (category.Depth == 1) { break; } this.categoryId = category.ParentCategoryId.Value; } if (category != null) { this.categoryId = category.CategoryId; } DataTable hotKeywords = CommentBrowser.GetHotKeywords(this.categoryId, int.Parse(node.Attributes["HotKeywordNum"].Value)); if (hotKeywords != null && hotKeywords.Rows.Count > 0) { stringBuilder_0.AppendLine("<ul>"); foreach (DataRow dataRow in hotKeywords.Rows) { stringBuilder_0.AppendFormat("<li><a href=\"{0}\">{1}</a></li>", Globals.GetSiteUrls().SubCategory((int)dataRow["CategoryId"], null) + "?keywords=" + Globals.UrlEncode((string)dataRow["Keywords"]), dataRow["Keywords"]).AppendLine(""); } stringBuilder_0.AppendLine("</ul>"); } if (node.Attributes["IsShowMoreLink"].Value == "true") { stringBuilder_0.AppendFormat("<em><a href=\"{0}\">更多>></a></em>", Globals.GetSiteUrls().SubCategory(this.categoryId, null)).AppendLine(); } stringBuilder_0.AppendLine("</div>"); }
public override DataTable GetBrandCategories(int categoryId, int maxNum) { StringBuilder builder = new StringBuilder(); builder.AppendFormat("SELECT TOP {0} BrandId, BrandName, Logo, RewriteName FROM Hishop_BrandCategories", maxNum); CategoryInfo category = CategoryBrowser.GetCategory(categoryId); if (category != null) { builder.AppendFormat(" WHERE BrandId IN (SELECT BrandId FROM Hishop_Products WHERE MainCategoryPath LIKE '{0}|%' OR ExtendCategoryPath LIKE '{0}|%')", category.Path); } builder.Append(" ORDER BY DisplaySequence DESC"); DbCommand sqlStringCommand = this.database.GetSqlStringCommand(builder.ToString()); using (IDataReader reader = this.database.ExecuteReader(sqlStringCommand)) { return(DataHelper.ConverDataReaderToDataTable(reader)); } }
protected override void AttachChildControls() { this.litLeadBuy = (Literal)this.FindControl("litLeadBuy"); this.common_Location = (Common_Location)this.FindControl("common_Location"); this.rptProducts = (ThemedTemplatedRepeater)this.FindControl("rptProducts"); this.pager = (Pager)this.FindControl("pager"); this.litSearchResultPage = (Literal)this.FindControl("litSearchResultPage"); 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.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); } this.cutdownSearch = (Common_CutdownSearch)this.FindControl("search_Common_CutdownSearch"); this.cutdownSearch.ReSearch += new Common_CutdownSearch.ReSearchEventHandler(this.cutdownSearch_ReSearch); if (!this.Page.IsPostBack) { CategoryInfo category = CategoryBrowser.GetCategory(this.categoryId); if (category != null) { if (this.common_Location != null) { this.common_Location.CateGoryPath = category.Path; } if (this.litLeadBuy != null) { this.litLeadBuy.Text = category.Notes1; } this.LoadPageSearch(category); } this.BindSearch(); } }
public override DataTable GetBrandCategories(int categoryId, int maxNum) { StringBuilder builder = new StringBuilder(); builder.AppendFormat("SELECT TOP {0} BrandId, BrandName, Logo, RewriteName FROM Hishop_BrandCategories", maxNum); builder.AppendFormat(" WHERE BrandId IN (SELECT BrandId FROM distro_Products WHERE DistributorUserId=@DistributorUserId", new object[0]); CategoryInfo category = CategoryBrowser.GetCategory(categoryId); if (category != null) { builder.AppendFormat(" AND (MainCategoryPath LIKE '{0}|%' OR ExtendCategoryPath LIKE '{0}|%')", category.Path); } builder.Append(") ORDER BY DisplaySequence DESC"); DbCommand sqlStringCommand = this.database.GetSqlStringCommand(builder.ToString()); this.database.AddInParameter(sqlStringCommand, "DistributorUserId", DbType.Int32, HiContext.Current.SiteSettings.UserId.Value); using (IDataReader reader = this.database.ExecuteReader(sqlStringCommand)) { return(DataHelper.ConverDataReaderToDataTable(reader)); } }
public string RendHtml() { StringBuilder builder = new StringBuilder(); XmlNode node = TagsHelper.FindCommentNode(this.CommentId, "attribute"); if (node != null) { builder.AppendFormat("<div class=\"attribute_bd cssEdite\" type=\"attribute\" 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); string rewriteName = null; CategoryInfo category = CategoryBrowser.GetCategory(result); if (category != null) { rewriteName = category.RewriteName; } IList <AttributeInfo> attributeInfoByCategoryId = CategoryBrowser.GetAttributeInfoByCategoryId(result, 0x3e8); if ((attributeInfoByCategoryId != null) && (attributeInfoByCategoryId.Count > 0)) { foreach (AttributeInfo info2 in attributeInfoByCategoryId) { builder.AppendLine("<dl class=\"attribute_dl\">"); builder.AppendFormat("<dt class=\"attribute_name\">{0}:</dt>", info2.AttributeName).AppendLine(); builder.AppendLine("<dd class=\"attribute_val\">"); builder.AppendLine("<div class=\"h_chooselist\">"); foreach (AttributeValueInfo info3 in info2.AttributeValues) { builder.AppendFormat("<a href=\"{0}\" >{1}</a>", string.Concat(new object[] { Globals.GetSiteUrls().SubCategory(result, rewriteName), "?valueStr=", info3.AttributeId, "_", info3.ValueId }), info3.ValueStr).AppendLine(); } builder.AppendLine("</div>"); builder.AppendLine("</dd>"); builder.AppendLine("</dl>"); } } builder.AppendLine("</div>"); } return(builder.ToString()); }
public override DataTable GetSaleProductRanking(int?categoryId, int maxNum) { StringBuilder builder = new StringBuilder(); builder.AppendFormat("SELECT TOP {0} ProductId, ProductName, ProductCode, ShowSaleCounts AS SaleCounts, ThumbnailUrl40, ThumbnailUrl60, ThumbnailUrl100,", maxNum); builder.AppendFormat(" ThumbnailUrl160, ThumbnailUrl180, ThumbnailUrl220, SalePrice, MarketPrice FROM vw_Hishop_BrowseProductList WHERE SaleStatus = {0}", 1); if (categoryId.HasValue) { CategoryInfo category = CategoryBrowser.GetCategory(categoryId.Value); if (category != null) { builder.AppendFormat(" AND ( MainCategoryPath LIKE '{0}|%' OR ExtendCategoryPath LIKE '{0}|%') ", category.Path); } } builder.Append("ORDER BY ShowSaleCounts DESC"); DbCommand sqlStringCommand = this.database.GetSqlStringCommand(builder.ToString()); using (IDataReader reader = this.database.ExecuteReader(sqlStringCommand)) { return(DataHelper.ConverDataReaderToDataTable(reader)); } }
public string RendHtml() { XmlNode xmlNode = TagsHelper.FindCommentNode(this.CommentId, "keyword"); StringBuilder stringBuilder = new StringBuilder(); if (xmlNode != null) { int categoryId = 0; int categoryId2 = 0; int hotKeywordsNum = 0; int.TryParse(xmlNode.Attributes["CategoryId"].Value, out categoryId2); int.TryParse(xmlNode.Attributes["MaxNum"].Value, out hotKeywordsNum); CategoryInfo category = CategoryBrowser.GetCategory(categoryId2); if (category != null) { categoryId = category.TopCategoryId; } //DataTable hotKeywords = CommentBrowser.GetHotKeywords(categoryId, hotKeywordsNum); DataTable hotKeywords = CommentBrowser.GetHotKeywords(categoryId, hotKeywordsNum, ClientType.PC); stringBuilder.AppendFormat("<ul class=\"keyword cssEdite\" type=\"keyword\" id=\"comments_{0}\" >", this.CommentId).AppendLine(); if (hotKeywords != null && hotKeywords.Rows.Count > 0) { foreach (DataRow dataRow in hotKeywords.Rows) { if (dataRow["CategoryId"] != DBNull.Value) { stringBuilder.AppendFormat("<li><a target=\"_blank\" href=\"{0}\">{1}</a></li>", Globals.GetSiteUrls().SubCategory((int)dataRow["CategoryId"], null) + "?keywords=" + Globals.UrlEncode((string)dataRow["Keywords"]), dataRow["Keywords"]).AppendLine(); } else { stringBuilder.AppendFormat("<li><a target=\"_blank\" href=\"{0}\">{1}</a></li>", "/SubCategory.aspx?keywords=" + Globals.UrlEncode((string)dataRow["Keywords"]), dataRow["Keywords"]).AppendLine(); } } } stringBuilder.AppendLine("</ul>"); } return(stringBuilder.ToString()); }
public override System.Data.DataTable GetSaleProductRanking(int?categoryId, int maxNum) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.AppendFormat("SELECT TOP {0} ProductId, ProductName, ProductCode, ShowSaleCounts AS SaleCounts, ThumbnailUrl40, ThumbnailUrl60, ThumbnailUrl100, ThumbnailUrl160,", maxNum); stringBuilder.AppendFormat(" ThumbnailUrl180, ThumbnailUrl220, SalePrice, MarketPrice FROM vw_distro_BrowseProductList WHERE SaleStatus = {0} and DistributorUserId = {1}", 1, HiContext.Current.SiteSettings.UserId.Value); if (categoryId.HasValue) { CategoryInfo category = CategoryBrowser.GetCategory(categoryId.Value); if (category != null) { stringBuilder.AppendFormat(" AND ( MainCategoryPath LIKE '{0}|%' OR ExtendCategoryPath LIKE '{0}|%') ", category.Path); } } stringBuilder.Append("ORDER BY ShowSaleCounts DESC"); System.Data.Common.DbCommand sqlStringCommand = this.database.GetSqlStringCommand(stringBuilder.ToString()); System.Data.DataTable result; using (System.Data.IDataReader dataReader = this.database.ExecuteReader(sqlStringCommand)) { result = DataHelper.ConverDataReaderToDataTable(dataReader); } return(result); }
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; }
protected override void AttachChildControls() { this.common_Location = (Common_Location)this.FindControl("common_Location"); this.rptProducts = (Common_GoodsList_Search)this.FindControl("list_Common_GoodsList_Search"); this.pager = (Pager)this.FindControl("pager"); this.litSearchResultPage = (Literal)this.FindControl("litSearchResultPage"); 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.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); } this.cutdownSearch = (Common_CutdownSearch)this.FindControl("search_Common_CutdownSearch"); this.cutdownSearch.ReSearch += new Common_CutdownSearch.ReSearchEventHandler(this.cutdownSearch_ReSearch); if (!this.Page.IsPostBack) { if (this.common_Location != null) { int result = 0; int.TryParse(this.Page.Request.QueryString["categoryId"], out result); CategoryInfo category = CategoryBrowser.GetCategory(result); if (category != null) { this.common_Location.CateGoryPath = category.Path; } } this.BindSearch(); } }
protected override void OnLoad(EventArgs e) { IList <CategoryInfo> mainCategories; int.TryParse(this.Page.Request.QueryString["categoryId"], out this.categoryId); if (this.categoryId > 0) { mainCategories = CategoryBrowser.SearchCategories(this.categoryId, null); if ((mainCategories == null) || (mainCategories.Count == 0)) { CategoryInfo category = CategoryBrowser.GetCategory(this.categoryId); if ((category != null) && category.ParentCategoryId.HasValue) { mainCategories = CategoryBrowser.SearchCategories(category.ParentCategoryId.Value, null); } } } else { mainCategories = CategoryBrowser.GetMainCategories(); } base.DataSource = mainCategories; base.DataBind(); }
protected override void AttachChildControls() { this.litProductName = (Literal)this.FindControl("litProductName"); this.litSalePrice = (Literal)this.FindControl("litSalePrice"); this.litSalesCount = (Literal)this.FindControl("litSalesCount"); this.litPrice = (Literal)this.FindControl("litPrice"); this.productImg = (Image)this.FindControl("productImg"); this.hidDelayDays = (HtmlInputHidden)this.FindControl("hidDelayDays"); this.hidPrice = (HtmlInputHidden)this.FindControl("hidPrice"); this.hidSendDays = (HtmlInputHidden)this.FindControl("hidSendDays"); this.hidQuantityPerDay = (HtmlInputHidden)this.FindControl("hidQuantityPerDay"); this.hidProductSku = (HtmlInputHidden)this.FindControl("hidProductSku"); this.hidSendStartDate = (HtmlInputHidden)this.FindControl("hidSendStartDate"); this.hidSendEndDate = (HtmlInputHidden)this.FindControl("hidSendEndDate"); if (!int.TryParse(this.Page.Request.QueryString["productId"], out this.productId)) { orderId = this.Page.Request.QueryString["xdOrderId"]; if (string.IsNullOrEmpty(orderId)) { base.GotoResourceNotFound(""); return; } } OrderInfo orderinfo = OrderHelper.GetOrderInfo(this.orderId); if (orderinfo != null) { foreach (LineItemInfo iteminfo in orderinfo.LineItems.Values) { this.productId = iteminfo.ProductId; this.hidSendDays.Value = iteminfo.SendDays.ToString(); this.hidQuantityPerDay.Value = iteminfo.QuantityPerDay.ToString(); this.hidSendStartDate.Value = iteminfo.SendStartDate.ToString("yyyy-MM-dd"); this.hidSendEndDate.Value = iteminfo.SendEndDate.ToString("yyyy-MM-dd"); } } ProductInfo product = ProductBrowser.GetProduct(MemberProcessor.GetCurrentMember(), this.productId); if (product != null) { litProductName.Text = product.ProductName; litSalePrice.Text = product.MinSalePrice.ToString("F2"); litPrice.Text = decimal.Parse(product.MarketPrice.ToString()).ToString("F2"); litSalesCount.Text = product.SaleCounts.ToString(); hidPrice.Value = product.MinSalePrice.ToString("F2"); productImg.ImageUrl = product.ThumbnailUrl310; //通过牛奶粉类获取延迟天数 if (!string.IsNullOrEmpty(product.MainCategoryPath)) { this.categoryId = product.MainCategoryPath.Split(new char[] { '|' })[0]; } else { this.categoryId = "0"; } CategoryInfo cinfo = CategoryBrowser.GetCategory(Convert.ToInt32(this.categoryId)); this.hidDelayDays.Value = cinfo.DelayDays.ToString(); this.hidProductSku.Value = product.SkuId; } PageTitle.AddSiteNameTitle("订购页面"); }
protected override void AttachChildControls() { if (!int.TryParse(this.Page.Request.QueryString["productId"], out this.productId)) { base.GotoResourceNotFound(""); } this.rptProductImages = (VshopTemplatedRepeater)this.FindControl("rptProductImages"); this.litItemParams = (Literal)this.FindControl("litItemParams"); this.litProdcutName = (Literal)this.FindControl("litProdcutName"); this.litProdcutName2 = (Literal)this.FindControl("litProdcutName2"); this.hidDelayDays = (HtmlInputHidden)this.FindControl("hidDelayDays"); this.litProdcutTag = (Literal)this.FindControl("litProdcutTag"); this.litSalePrice = (Literal)this.FindControl("litSalePrice"); this.litMarketPrice = (Literal)this.FindControl("litMarketPrice"); this.litShortDescription = (Literal)this.FindControl("litShortDescription"); this.litDescription = (Literal)this.FindControl("litDescription"); this.litStock = (Literal)this.FindControl("litStock"); this.skuSelector = (Common_SKUSelector)this.FindControl("skuSelector"); this.linkDescription = (HyperLink)this.FindControl("linkDescription"); this.expandAttr = (Common_ExpandAttributes)this.FindControl("ExpandAttributes"); this.litSoldCount = (Literal)this.FindControl("litSoldCount"); this.litConsultationsCount = (Literal)this.FindControl("litConsultationsCount"); this.litReviewsCount = (Literal)this.FindControl("litReviewsCount"); this.litHasCollected = (HtmlInputHidden)this.FindControl("litHasCollected"); this.litCategoryId = (HtmlInputHidden)this.FindControl("litCategoryId"); this.litproductid = (HtmlInputHidden)this.FindControl("litproductid"); this.litTemplate = (HtmlInputHidden)this.FindControl("litTemplate"); ProductInfo product = ProductBrowser.GetProduct(MemberProcessor.GetCurrentMember(), this.productId); if (product != null) { this.litproductid.Value = this.productId.ToString(); this.litTemplate.Value = product.FreightTemplateId.ToString(); if (product == null) { base.GotoResourceNotFound("此商品已不存在"); } if (product.SaleStatus != ProductSaleStatus.OnSale) { base.GotoResourceNotFound(ErrorType.前台商品下架, "此商品已下架"); } if (this.rptProductImages != null) { string locationUrl = "javascript:;"; SlideImage[] source = new SlideImage[] { new SlideImage(product.ImageUrl1, locationUrl), new SlideImage(product.ImageUrl2, locationUrl), new SlideImage(product.ImageUrl3, locationUrl), new SlideImage(product.ImageUrl4, locationUrl), new SlideImage(product.ImageUrl5, locationUrl) }; this.rptProductImages.DataSource = from item in source where !string.IsNullOrWhiteSpace(item.ImageUrl) select item; this.rptProductImages.DataBind(); } string mainCategoryPath = product.MainCategoryPath; if (!string.IsNullOrEmpty(mainCategoryPath)) { this.litCategoryId.Value = mainCategoryPath.Split(new char[] { '|' })[0]; } else { this.litCategoryId.Value = "0"; } //通过牛奶粉类获取延迟天数 CategoryInfo cinfo = CategoryBrowser.GetCategory(Convert.ToInt32(this.litCategoryId.Value)); this.hidDelayDays.Value = cinfo.DelayDays.ToString(); string productName = product.ProductName; string text = ProductBrowser.GetProductTagName(this.productId); if (!string.IsNullOrEmpty(text)) { this.litProdcutTag.Text = "<div class='y-shopicon'>" + text.Trim() + "</div>"; text = "<span class='producttag'>【" + HttpContext.Current.Server.HtmlEncode(text) + "】</span>"; } this.litProdcutName.Text = text + productName; this.litProdcutName2.Text = productName; if (product.MinSalePrice != product.MaxSalePrice) { this.litSalePrice.Text = product.MinSalePrice.ToString("F2") + "~" + product.MaxSalePrice.ToString("F2"); } else { this.litSalePrice.Text = product.MinSalePrice.ToString("F2"); } if (product.MarketPrice.HasValue) { if (product.MarketPrice > 0m) { this.litMarketPrice.Text = "<del class=\"text-muted font-s\">¥" + product.MarketPrice.Value.ToString("F2") + "</del>"; } } this.litShortDescription.Text = product.ShortDescription; string text2 = product.Description; if (!string.IsNullOrEmpty(text2)) { text2 = Regex.Replace(text2, "<img[^>]*\\bsrc=('|\")([^'\">]*)\\1[^>]*>", "<img alt='" + HttpContext.Current.Server.HtmlEncode(productName) + "' src='$2' />", RegexOptions.IgnoreCase); } if (this.litDescription != null) { this.litDescription.Text = text2; } this.litSoldCount.SetWhenIsNotNull(product.ShowSaleCounts.ToString()); this.litStock.Text = product.Stock.ToString(); this.skuSelector.ProductId = this.productId; if (this.expandAttr != null) { this.expandAttr.ProductId = this.productId; } if (this.linkDescription != null) { this.linkDescription.NavigateUrl = "/Vshop/ProductDescription.aspx?productId=" + this.productId; } int num = ProductBrowser.GetProductConsultationsCount(this.productId, false); this.litConsultationsCount.SetWhenIsNotNull(num.ToString()); num = ProductBrowser.GetProductReviewsCount(this.productId); this.litReviewsCount.SetWhenIsNotNull(num.ToString()); MemberInfo currentMember = MemberProcessor.GetCurrentMember(); bool flag = false; if (currentMember != null) { flag = ProductBrowser.CheckHasCollect(currentMember.UserId, this.productId); } this.litHasCollected.SetWhenIsNotNull(flag ? "1" : "0"); ProductBrowser.UpdateVisitCounts(this.productId); PageTitle.AddSiteNameTitle(productName); PageTitle.AddSiteDescription(product.ShortDescription); SiteSettings masterSettings = SettingsManager.GetMasterSettings(false); string objStr = ""; if (!string.IsNullOrEmpty(masterSettings.GoodsPic)) { objStr = Globals.HostPath(HttpContext.Current.Request.Url) + masterSettings.GoodsPic; } this.litItemParams.Text = string.Concat(new string[] { Globals.GetReplaceStr(objStr, "|", "|"), "|", Globals.GetReplaceStr(masterSettings.GoodsName, "|", "|"), "|", Globals.GetReplaceStr(masterSettings.GoodsDescription, "|", "|"), "$", Globals.HostPath(HttpContext.Current.Request.Url).Replace("|", "|"), Globals.GetReplaceStr(product.ImageUrl1, "|", "|"), "|", Globals.GetReplaceStr(product.ProductName, "|", "|"), "|", Globals.GetReplaceStr(product.ShortDescription, "|", "|"), "|", HttpContext.Current.Request.Url.ToString().Replace("|", "|") }); } else { HttpContext.Current.Response.Redirect("/default.aspx"); HttpContext.Current.Response.End(); } }
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 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 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, str, str2, 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); }
protected override void AttachChildControls() { this.serach_text = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("search_text"); this.search_Subtext = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("search_Subtext"); this.common_attributeslist = (Common_AttributesList)this.FindControl("common_attributeslist"); this.litLeadBuy = (System.Web.UI.WebControls.Literal) this.FindControl("litLeadBuy"); this.litHotGood = (System.Web.UI.WebControls.Literal) this.FindControl("litHotGood"); this.common_Location = (Common_Location)this.FindControl("common_Location"); this.rptProducts = (ThemedTemplatedRepeater)this.FindControl("rptProducts"); this.pager = (Pager)this.FindControl("pager"); this.litSearchResultPage = (System.Web.UI.WebControls.Literal) this.FindControl("litSearchResultPage"); 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.hotSale = (Common_GoodsList_HotSale)this.FindControl("list_Common_GoodsList_HotSale");//销售排行 if (this.btnSortPrice != null) { this.btnSortPrice.Sorting += new Common_Search_SortTime.SortingHandler(this.btnSortPrice_Sorting); } if (this.btnSortTime != null) { 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.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(); } this.cutdownSearch = (Common_CutdownSearch)this.FindControl("search_Common_CutdownSearch"); if (this.cutdownSearch != null) { this.cutdownSearch.ReSearch += new Common_CutdownSearch.ReSearchEventHandler(this.cutdownSearch_ReSearch); } if (!this.Page.IsPostBack) { CategoryInfo category = CategoryBrowser.GetCategory(this.categoryId); if (category != null) { if (this.common_Location != null) { this.common_Location.CateGoryPath = category.Path; } if (this.litLeadBuy != null) { this.litLeadBuy.Text = category.Notes1; } if (this.litHotGood != null) { this.litHotGood.Text = category.Notes2; } this.LoadPageSearch(category); } this.BindSearch(); } }
protected override void AttachChildControls() { int num2; int num3; string url = this.Page.Request.QueryString["returnUrl"]; if (!string.IsNullOrWhiteSpace(this.Page.Request.QueryString["returnUrl"])) { this.Page.Response.Redirect(url); } string str2 = this.Page.Request.QueryString["status"]; if (string.IsNullOrEmpty(str2)) { str2 = "1"; } MemberInfo currentMember = MemberProcessor.GetCurrentMember(); int num = 0; int.TryParse(str2, out num); this.rptUseableCouponList = (VshopTemplatedRepeater)this.FindControl("rptUseableCouponList"); this.txtTotal = (HtmlInputHidden)this.FindControl("txtTotal"); if (!int.TryParse(this.Page.Request.QueryString["page"], out num2)) { num2 = 1; } if (!int.TryParse(this.Page.Request.QueryString["size"], out num3)) { num3 = 20; } this.rptUseableCouponList.DataSource = CouponHelper.GetUseableCoupons(currentMember.UserId); //转换成DataTable类型,加一列适用范围说明. ((DataTable)this.rptUseableCouponList.DataSource).Columns.Add("txtUseRange"); //对优惠券列表数据源遍历,判断categoryid和senderid是否有限制 foreach (DataRow row in ((DataTable)this.rptUseableCouponList.DataSource).Rows) { string categoryName = ""; string senderName = ""; //判断categoryid if (row["categoryid"] != DBNull.Value && row["categoryid"].ToString() != "0") { categoryName = CategoryBrowser.GetCategory(Convert.ToInt32(row["categoryid"])).Name; } //判断senderid if (row["senderid"] != DBNull.Value && row["senderid"].ToString() != "0") { senderName = DistributorsBrower.GetDistributorInfo(Convert.ToInt32(row["senderid"])).StoreName; } //拼接到适用范围字段内 if (categoryName == "" && senderName == "") { row["txtUseRange"] = "在任何商品和门店下使用"; } else if (categoryName == "" && senderName != "") { row["txtUseRange"] = string.Format("在{0}门店下使用", senderName); } else if (categoryName != "" && senderName == "") { row["txtUseRange"] = string.Format("在{0}类商品下使用", categoryName); } else if (categoryName != "" && senderName != "") { row["txtUseRange"] = string.Format("在{0}门店,{1}类商品下使用", senderName, categoryName); } } if (currentMember.UserName != "[堂食用户]") { this.rptUseableCouponList.DataBind(); } this.txtTotal.SetWhenIsNotNull(CouponHelper.GetUseableCoupons(currentMember.UserId).Rows.Count.ToString()); PageTitle.AddSiteNameTitle("领取优惠券"); }
protected override void AttachChildControls() { if (!int.TryParse(this.Page.Request.QueryString["productId"], out this.productId)) { base.GotoResourceNotFound(""); } this.rptProductImages = (VshopTemplatedRepeater)this.FindControl("rptProductImages"); this.litProdcutName = (Literal)this.FindControl("litProdcutName"); this.litSalePrice = (Literal)this.FindControl("litSalePrice"); this.litMarketPrice = (Literal)this.FindControl("litMarketPrice"); this.litShortDescription = (Literal)this.FindControl("litShortDescription"); this.litDescription = (Literal)this.FindControl("litDescription"); this.litStock = (Literal)this.FindControl("litStock"); this.skuSelector = (Common_SKUSelector)this.FindControl("skuSelector"); this.linkDescription = (HyperLink)this.FindControl("linkDescription"); this.expandAttr = (Common_ExpandAttributes)this.FindControl("ExpandAttributes"); this.litSoldCount = (Literal)this.FindControl("litSoldCount"); this.litConsultationsCount = (Literal)this.FindControl("litConsultationsCount"); this.litReviewsCount = (Literal)this.FindControl("litReviewsCount"); this.litHasCollected = (HtmlInputHidden)this.FindControl("litHasCollected"); this.litFenyong = (Literal)this.FindControl("litFenyong"); this.fenyongPanel = (Panel)this.FindControl("fenyongPanel"); ProductInfo product = ProductBrowser.GetProduct(MemberProcessor.GetCurrentMember(), this.productId); if (product == null) { base.GotoResourceNotFound("此商品已不存在"); } if (product.SaleStatus != ProductSaleStatus.OnSale) { base.GotoResourceNotFound("此商品已下架"); } if (this.rptProductImages != null) { string locationUrl = "javascript:;"; SlideImage[] imageArray = new SlideImage[] { new SlideImage(product.ImageUrl1, locationUrl), new SlideImage(product.ImageUrl2, locationUrl), new SlideImage(product.ImageUrl3, locationUrl), new SlideImage(product.ImageUrl4, locationUrl), new SlideImage(product.ImageUrl5, locationUrl) }; this.rptProductImages.DataSource = from item in imageArray where !string.IsNullOrWhiteSpace(item.ImageUrl) select item; this.rptProductImages.DataBind(); } this.litProdcutName.Text = product.ProductName; PageTitle.AddSiteNameTitle(product.ProductName); this.litSalePrice.Text = product.MinSalePrice.ToString("F2"); if (product.MarketPrice.HasValue) { this.litMarketPrice.SetWhenIsNotNull(product.MarketPrice.GetValueOrDefault(0M).ToString("F2")); } this.litShortDescription.Text = product.ShortDescription; if (this.litDescription != null) { this.litDescription.Text = product.Description; } this.litSoldCount.SetWhenIsNotNull(product.ShowSaleCounts.ToString()); this.litStock.Text = product.Stock.ToString(); this.skuSelector.ProductId = this.productId; if (this.expandAttr != null) { this.expandAttr.ProductId = this.productId; } if (this.linkDescription != null) { this.linkDescription.NavigateUrl = "/Vshop/ProductDescription.aspx?productId=" + this.productId; } this.litConsultationsCount.SetWhenIsNotNull(ProductBrowser.GetProductConsultationsCount(this.productId, false).ToString()); this.litReviewsCount.SetWhenIsNotNull(ProductBrowser.GetProductReviewsCount(this.productId).ToString()); MemberInfo currentMember = MemberProcessor.GetCurrentMember(); bool flag = false; if (currentMember != null) { flag = ProductBrowser.CheckHasCollect(currentMember.UserId, this.productId); } this.litHasCollected.SetWhenIsNotNull(flag ? "1" : "0"); //显示佣金 try { //是否分销商 DistributorsInfo currentDistributors = DistributorsBrower.GetCurrentDistributors(Globals.GetCurrentMemberUserId()); if (currentDistributors != null) { decimal commission = decimal.Parse(CategoryBrowser.GetCategory(product.CategoryId).FirstCommission); this.litFenyong.Text = (commission * (product.MinSalePrice - product.MinCostPrice) / 100).ToString("F2"); } else { this.fenyongPanel.Visible = false; } } catch (Exception) { } ProductBrowser.UpdateVisitCounts(this.productId); }
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; }