protected override void AttachChildControls() { 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) { this.BindBrandProduct(); } }
protected override void AttachChildControls() { this.rptAffiches = (ThemedTemplatedRepeater) this.FindControl("rptAffiches"); if (!this.Page.IsPostBack) { this.rptAffiches.DataSource = CommentBrowser.GetAfficheList(); this.rptAffiches.DataBind(); } }
protected override void AttachChildControls() { this.rptGifts = (ThemedTemplatedRepeater) this.FindControl("rptGifts"); this.pager = (Pager) this.FindControl("pager"); if (!this.Page.IsPostBack) { this.BindGift(); } }
protected override void AttachChildControls() { this.rptPromoteSales = (ThemedTemplatedRepeater) this.FindControl("rptPromoteSales"); this.pager = (Pager) this.FindControl("pager"); if (!this.Page.IsPostBack) { PageTitle.AddSiteNameTitle("优惠活动中心", HiContext.Current.Context); this.BindPromoteSales(); } }
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(); } }
protected override void AttachChildControls() { if (!int.TryParse(this.Page.Request.QueryString["productId"], out this.productId)) { base.GotoResourceNotFound(); } this.rptRecords = (ThemedTemplatedRepeater) this.FindControl("rptRecords"); this.pager = (Pager) this.FindControl("pager"); if (!this.Page.IsPostBack) { PageTitle.AddSiteNameTitle("商品咨询", HiContext.Current.Context); this.BindData(); } }
protected override void AttachChildControls() { this.rptProducts = (ThemedTemplatedRepeater) this.FindControl("rptProducts"); this.pager = (Pager) this.FindControl("pager"); this.litSearchResultPage = (Literal) this.FindControl("litSearchResultPage"); this.txtSKU = (HtmlInputText) this.FindControl("txtSKU"); this.txtKeywords = (HtmlInputText) this.FindControl("txtKeywords"); this.txtStartPrice = (HtmlInputText) this.FindControl("txtStartPrice"); this.txtEndPrice = (HtmlInputText) this.FindControl("txtEndPrice"); this.btnSearch = ButtonManager.Create(this.FindControl("btnSearch")); this.btnSearch.Click += new EventHandler(this.btnSearch_Click); if (!this.Page.IsPostBack) { string title = "商品下架区"; PageTitle.AddTitle(title, HiContext.Current.Context); this.BindProducts(this.GetProductBrowseQuery()); } }
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 override void AttachChildControls() { if (!long.TryParse(this.Page.Request.QueryString["VoteId"], out this.voteId)) { base.GotoResourceNotFound(); } this.lblTotal = (Label) this.FindControl("lblTotal"); this.lblVoteName = (Literal) this.FindControl("lblVoteName"); this.rptVoteItem = (ThemedTemplatedRepeater) this.FindControl("rptVoteItem"); if (!this.Page.IsPostBack) { VoteInfo voteById = CommentBrowser.GetVoteById(this.voteId); if (voteById != null) { PageTitle.AddSiteNameTitle(voteById.VoteName, HiContext.Current.Context); this.Vote(voteById); VoteInfo vote = CommentBrowser.GetVoteById(this.voteId); this.BindVoteItem(vote); } } }
protected override void AttachChildControls() { this.rptHelps = (ThemedTemplatedRepeater) this.FindControl("rptHelps"); this.pager = (Pager) this.FindControl("pager"); if (!this.Page.IsPostBack) { if (!string.IsNullOrEmpty(this.Page.Request.QueryString["CategoryId"])) { int result = 0; int.TryParse(this.Page.Request.QueryString["CategoryId"], out result); HelpCategoryInfo helpCategory = CommentBrowser.GetHelpCategory(result); if (helpCategory != null) { PageTitle.AddSiteNameTitle(helpCategory.Name, HiContext.Current.Context); } } else { PageTitle.AddSiteNameTitle("帮助中心", HiContext.Current.Context); } this.BindList(); } }
protected override void AttachChildControls() { this.rptLeaveComments = (ThemedTemplatedRepeater) this.FindControl("rptLeaveComments"); this.pager = (Pager) this.FindControl("pager"); this.txtTitle = (TextBox) this.FindControl("txtTitle"); this.txtUserName = (TextBox) this.FindControl("txtUserName"); this.txtContent = (TextBox) this.FindControl("txtContent"); this.btnRefer = ButtonManager.Create(this.FindControl("btnRefer")); this.spLeaveUserName = (HtmlControl) this.FindControl("spLeaveUserName"); this.spLeavePsw = (HtmlControl) this.FindControl("spLeavePsw"); this.spLeaveReg = (HtmlControl) this.FindControl("spLeaveReg"); this.txtLeaveUserName = (HtmlInputText) this.FindControl("txtLeaveUserName"); this.txtLeavePsw = (HtmlInputText) this.FindControl("txtLeavePsw"); this.txtLeaveCode = (HtmlInputText) this.FindControl("txtLeaveCode"); this.btnRefer.Click += new EventHandler(this.btnRefer_Click); PageTitle.AddSiteNameTitle("客户留言", HiContext.Current.Context); if ((HiContext.Current.User.UserRole == UserRole.Member) || (HiContext.Current.User.UserRole == UserRole.Underling)) { this.txtUserName.Text = HiContext.Current.User.Username; this.txtLeaveUserName.Value = string.Empty; this.txtLeavePsw.Value = string.Empty; this.spLeaveUserName.Visible = false; this.spLeavePsw.Visible = false; this.spLeaveReg.Visible = false; this.btnRefer.Text = "发表"; } else { this.spLeaveUserName.Visible = true; this.spLeavePsw.Visible = true; this.spLeaveReg.Visible = true; this.btnRefer.Text = "登录并留言"; } this.txtLeaveCode.Value = string.Empty; this.BindList(); }
protected override void AttachChildControls() { if (!int.TryParse(this.Page.Request.QueryString["productId"], out this.productId)) { base.GotoResourceNotFound(); } this.common_Location = (Common_Location) this.FindControl("common_Location"); this.litProductName = (Literal) this.FindControl("litProductName"); this.lblProductCode = (Literal) this.FindControl("lblProductCode"); this.lblSku = (SkuLabel) this.FindControl("lblSku"); this.lblStock = (StockLabel) this.FindControl("lblStock"); this.litUnit = (Literal) this.FindControl("litUnit"); this.litWeight = (WeightLabel) this.FindControl("litWeight"); this.litBrosedNum = (Literal) this.FindControl("litBrosedNum"); this.litBrand = (Literal) this.FindControl("litBrand"); this.lblMarkerPrice = (FormatedMoneyLabel) this.FindControl("lblMarkerPrice"); this.lblBuyPrice = (Label) this.FindControl("lblBuyPrice"); this.lblTotalPrice = (TotalLabel) this.FindControl("lblTotalPrice"); this.litDescription = (Literal) this.FindControl("litDescription"); this.litShortDescription = (Literal) this.FindControl("litShortDescription"); this.hpkProductConsultations = (HyperLink) this.FindControl("hpkProductConsultations"); this.hpkProductReviews = (HyperLink) this.FindControl("hpkProductReviews"); this.images = (Common_ProductImages) this.FindControl("common_ProductImages"); this.rptExpandAttributes = (ThemedTemplatedRepeater) this.FindControl("rptExpandAttributes"); this.skuSelector = (SKUSelector) this.FindControl("SKUSelector"); this.reviews = (Common_ProductReview) this.FindControl("list_Common_ProductReview"); this.consultations = (Common_ProductConsultations) this.FindControl("list_Common_ProductConsultations"); this.correlative = (Common_GoodsList_Correlative) this.FindControl("list_Common_GoodsList_Correlative"); if (!this.Page.IsPostBack) { int maxNum = 0; if (this.reviews != null) { maxNum = this.reviews.MaxNum; } int num2 = 0; if (this.consultations != null) { num2 = this.consultations.MaxNum; } ProductBrowseInfo info = ProductBrowser.GetProductBrowseInfo(this.productId, new int?(maxNum), new int?(num2)); if ((info.Product == null) || (info.Product.SaleStatus == ProductSaleStatus.Delete)) { this.Page.Response.Redirect(Globals.ApplicationPath + "/ResourceNotFound.aspx?errorMsg=" + Globals.UrlEncode("该件商品已经被管理员删除")); } else if (info.Product.SaleStatus == ProductSaleStatus.OnSale) { Globals.GetSiteUrls().UrlData.FormatUrl("productdetails", new object[] { this.Page.Request.QueryString["productId"] }); } else { this.LoadPageSearch(info.Product); if (this.hpkProductReviews != null) { this.hpkProductReviews.Text = "查看全部" + ProductBrowser.GetProductReviewNumber(this.productId).ToString() + "条评论"; this.hpkProductReviews.NavigateUrl = string.Format("LookProductReviews.aspx?productId={0}", this.productId); } if (this.hpkProductConsultations != null) { this.hpkProductConsultations.Text = "查看全部" + ProductBrowser.GetProductConsultationNumber(this.productId).ToString() + "条咨询"; this.hpkProductConsultations.NavigateUrl = string.Format("ProductConsultationsAndReplay.aspx?productId={0}", this.productId); } this.LoadProductInfo(info.Product, info.BrandName); BrowsedProductQueue.EnQueue(this.productId); this.images.ImageInfo = info.Product; if (info.DbAttribute != null) { this.rptExpandAttributes.DataSource = info.DbAttribute; this.rptExpandAttributes.DataBind(); } if (info.DbSKUs != null) { this.skuSelector.ProductId = this.productId; this.skuSelector.DataSource = info.DbSKUs; } if ((this.reviews != null) && (info.DBReviews != null)) { this.reviews.DataSource = info.DBReviews; this.reviews.DataBind(); } if ((this.consultations != null) && (info.DBConsultations != null)) { this.consultations.DataSource = info.DBConsultations; this.consultations.DataBind(); } if ((this.correlative != null) && (info.DbCorrelatives != null)) { this.correlative.DataSource = info.DbCorrelatives; this.correlative.DataBind(); } } } }
protected override void AttachChildControls() { if (!int.TryParse(this.Page.Request.QueryString["productId"], out this.productId)) { base.GotoResourceNotFound(); } this.common_Location = (Common_Location) this.FindControl("common_Location"); this.litProductName = (Literal) this.FindControl("litProductName"); this.lblSku = (SkuLabel) this.FindControl("lblSku"); this.lblStock = (StockLabel) this.FindControl("lblStock"); this.litUnit = (Literal) this.FindControl("litUnit"); this.litWeight = (WeightLabel) this.FindControl("litWeight"); this.litBrosedNum = (Literal) this.FindControl("litBrosedNum"); this.litBrand = (Literal) this.FindControl("litBrand"); this.lblSalePrice = (FormatedMoneyLabel) this.FindControl("lblSalePrice"); this.lblTotalPrice = (TotalLabel) this.FindControl("lblTotalPrice"); this.litDescription = (Literal) this.FindControl("litDescription"); this.litShortDescription = (Literal) this.FindControl("litShortDescription"); this.btnOrder = (BuyButton) this.FindControl("btnOrder"); this.hpkProductConsultations = (HyperLink) this.FindControl("hpkProductConsultations"); this.hpkProductReviews = (HyperLink) this.FindControl("hpkProductReviews"); this.lblCurrentSalePrice = (FormatedMoneyLabel) this.FindControl("lblCurrentSalePrice"); this.litCount = (Label) this.FindControl("litCount"); this.lblNeedPrice = (FormatedMoneyLabel) this.FindControl("lblNeedPrice"); this.litContent = (Literal) this.FindControl("litContent"); this.lblEndTime = (FormatedTimeLabel) this.FindControl("lblEndTime"); this.litRemainTime = (Literal) this.FindControl("litRemainTime"); this.litNeedCount = (Literal) this.FindControl("litNeedCount"); this.litMaxCount = (Label) this.FindControl("litMaxCount"); this.images = (Common_ProductImages) this.FindControl("common_ProductImages"); this.rptExpandAttributes = (ThemedTemplatedRepeater) this.FindControl("rptExpandAttributes"); this.skuSelector = (SKUSelector) this.FindControl("SKUSelector"); this.reviews = (Common_ProductReview) this.FindControl("list_Common_ProductReview"); this.consultations = (Common_ProductConsultations) this.FindControl("list_Common_ProductConsultations"); this.correlative = (Common_GoodsList_Correlative) this.FindControl("list_Common_GoodsList_Correlative"); if (!this.Page.IsPostBack) { ProductBrowseInfo info = ProductBrowser.GetProductBrowseInfo(this.productId, new int?(this.reviews.MaxNum), new int?(this.consultations.MaxNum)); GroupBuyInfo productGroupBuyInfo = ProductBrowser.GetProductGroupBuyInfo(this.productId); if ((info.Product == null) || (productGroupBuyInfo == null)) { this.Page.Response.Redirect(Globals.ApplicationPath + "/ResourceNotFound.aspx?errorMsg=" + Globals.UrlEncode("该件商品参与的团购活动已经结束;或已被管理员删除")); } else { this.LoadPageSearch(info.Product); this.hpkProductReviews.Text = "查看全部" + ProductBrowser.GetProductReviewNumber(this.productId).ToString() + "条评论"; this.hpkProductConsultations.Text = "查看全部" + ProductBrowser.GetProductConsultationNumber(this.productId).ToString() + "条咨询"; this.hpkProductConsultations.NavigateUrl = string.Format("ProductConsultationsAndReplay.aspx?productId={0}", this.productId); this.hpkProductReviews.NavigateUrl = string.Format("LookProductReviews.aspx?productId={0}", this.productId); this.LoadProductInfo(info.Product, info.BrandName); this.LoadProductGroupBuyInfo(productGroupBuyInfo); this.btnOrder.Stock = info.Product.Stock; BrowsedProductQueue.EnQueue(this.productId); this.images.ImageInfo = info.Product; if (info.DbAttribute != null) { this.rptExpandAttributes.DataSource = info.DbAttribute; this.rptExpandAttributes.DataBind(); } if (info.DbSKUs != null) { this.skuSelector.ProductId = this.productId; this.skuSelector.DataSource = info.DbSKUs; } if (info.DBReviews != null) { this.reviews.DataSource = info.DBReviews; this.reviews.DataBind(); } if (info.DBConsultations != null) { this.consultations.DataSource = info.DBConsultations; this.consultations.DataBind(); } if (info.DbCorrelatives != null) { this.correlative.DataSource = info.DbCorrelatives; this.correlative.DataBind(); } } } }
protected override void AttachChildControls() { if (!int.TryParse(Page.Request.QueryString["productId"], out productId)) { base.GotoResourceNotFound(); } common_Location = (Common_Location)FindControl("common_Location"); litProductName = (Literal)FindControl("litProductName"); lblProductCode = (Literal)FindControl("lblProductCode"); lblSku = (SkuLabel)FindControl("lblSku"); lblStock = (StockLabel)FindControl("lblStock"); litUnit = (Literal)FindControl("litUnit"); litWeight = (WeightLabel)FindControl("litWeight"); litBrosedNum = (Literal)FindControl("litBrosedNum"); litBrand = (Literal)FindControl("litBrand"); litSaleCounts = (Literal)FindControl("litSaleCounts"); lblMarkerPrice = (FormatedMoneyLabel)FindControl("lblMarkerPrice"); lblBuyPrice = (Label)FindControl("lblBuyPrice"); lblTotalPrice = (TotalLabel)FindControl("lblTotalPrice"); litDescription = (Literal)FindControl("litDescription"); litShortDescription = (Literal)FindControl("litShortDescription"); btnBuy = (BuyButton)FindControl("btnBuy"); btnaddgouwu = (AddCartButton)FindControl("btnaddgouwu"); hpkProductConsultations = (HyperLink)FindControl("hpkProductConsultations"); hpkProductReviews = (HyperLink)FindControl("hpkProductReviews"); images = (Common_ProductImages)FindControl("common_ProductImages"); rptExpandAttributes = (ThemedTemplatedRepeater)FindControl("rptExpandAttributes"); skuSelector = (SKUSelector)FindControl("SKUSelector"); reviews = (Common_ProductReview)FindControl("list_Common_ProductReview"); consultations = (Common_ProductConsultations)FindControl("list_Common_ProductConsultations"); correlative = (Common_GoodsList_Correlative)FindControl("list_Common_GoodsList_Correlative"); if (!Page.IsPostBack) { ProductBrowseInfo info = ProductBrowser.GetProductBrowseInfo(productId, new int?(reviews.MaxNum), new int?(consultations.MaxNum)); if ((info.Product == null) || (info.Product.SaleStatus == ProductSaleStatus.Delete)) { Page.Response.Redirect(Globals.ApplicationPath + "/ResourceNotFound.aspx?errorMsg=" + Globals.UrlEncode("该件商品已经被管理员删除")); } else { if (info.Product.SaleStatus == ProductSaleStatus.UnSale) { Page.Response.Redirect(Globals.GetSiteUrls().UrlData.FormatUrl("unproductdetails", new object[] { Page.Request.QueryString["productId"] })); } LoadPageSearch(info.Product); hpkProductReviews.Text = "查看全部" + ProductBrowser.GetProductReviewNumber(productId).ToString() + "条评论"; hpkProductConsultations.Text = "查看全部" + ProductBrowser.GetProductConsultationNumber(productId).ToString() + "条咨询"; hpkProductConsultations.NavigateUrl = string.Format("ProductConsultationsAndReplay.aspx?productId={0}", productId); hpkProductReviews.NavigateUrl = string.Format("LookProductReviews.aspx?productId={0}", productId); LoadProductInfo(info.Product, info.BrandName); btnBuy.Stock = info.Product.Stock; btnaddgouwu.Stock = info.Product.Stock; BrowsedProductQueue.EnQueue(productId); images.ImageInfo = info.Product; if (info.DbAttribute != null) { rptExpandAttributes.DataSource = info.DbAttribute; rptExpandAttributes.DataBind(); } if (info.DbSKUs != null) { skuSelector.ProductId = productId; skuSelector.DataSource = info.DbSKUs; } if (info.DBReviews != null) { reviews.DataSource = info.DBReviews; reviews.DataBind(); } if (info.DBConsultations != null) { consultations.DataSource = info.DBConsultations; consultations.DataBind(); } if (info.DbCorrelatives != null) { correlative.DataSource = info.DbCorrelatives; correlative.DataBind(); } } } }