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["modeId"], out this.paymentModeId); decimal.TryParse(this.Page.Request.QueryString["blance"], out this.balance); this.litUserName = (Literal)this.FindControl("litUserName"); this.lblPaymentName = (Literal)this.FindControl("lblPaymentName"); this.imgPayment = (HiImage)this.FindControl("imgPayment"); this.lblBlance = (FormatedMoneyLabel)this.FindControl("lblBlance"); this.litPayCharge = (Literal)this.FindControl("litPayCharge"); this.btnConfirm = ButtonManager.Create(this.FindControl("btnConfirm")); PageTitle.AddSiteNameTitle("充值确认", HiContext.Current.Context); this.btnConfirm.Click += new EventHandler(this.btnConfirm_Click); if (!this.Page.IsPostBack) { if ((this.paymentModeId == 0) || (this.balance == 0M)) { this.Page.Response.Redirect(Globals.GetSiteUrls().UrlData.FormatUrl("user_InpourRequest")); } else { PaymentModeInfo paymentMode = TradeHelper.GetPaymentMode(this.paymentModeId); this.litUserName.Text = HiContext.Current.User.Username; if (paymentMode != null) { this.lblPaymentName.Text = paymentMode.Name; this.lblBlance.Money = this.balance; this.ViewState["PayCharge"] = paymentMode.CalcPayCharge(this.balance); this.litPayCharge.Text = Globals.FormatMoney(paymentMode.CalcPayCharge(this.balance)); } } } }
protected override void AttachChildControls() { if (!int.TryParse(this.Page.Request.QueryString["TopicId"], out this.topicId)) { base.GotoResourceNotFound(""); } if (HiContext.Current.User.UserRole == UserRole.Member && ((Member)HiContext.Current.User).ReferralStatus == 2 && string.IsNullOrEmpty(this.Page.Request.QueryString["ReferralUserId"])) { string text = System.Web.HttpContext.Current.Request.Url.ToString(); if (text.IndexOf("?") > -1) { text = text + "&ReferralUserId=" + HiContext.Current.User.UserId; } else { text = text + "?ReferralUserId=" + HiContext.Current.User.UserId; } this.Page.Response.Redirect(text); return; } this.imgUrl = (HiImage)this.FindControl("imgUrl"); this.litContent = (System.Web.UI.WebControls.Literal) this.FindControl("litContent"); TopicInfo topic = VshopBrowser.GetTopic(this.topicId); if (topic == null) { base.GotoResourceNotFound(""); } //主题大图和标题 this.imgUrl.ImageUrl = topic.IconUrl; this.litContent.Text = topic.Content; PageTitle.AddSiteNameTitle(topic.Content); }
protected override void AttachChildControls() { int.TryParse(base.GetParameter("modeId", false), out this.paymentModeId); decimal.TryParse(base.GetParameter("blance", false), out this.balance); this.litUserName = (Literal)this.FindControl("litUserName"); this.lblPaymentName = (Literal)this.FindControl("lblPaymentName"); this.imgPayment = (HiImage)this.FindControl("imgPayment"); this.lblBlance = (FormatedMoneyLabel)this.FindControl("lblBlance"); this.btnConfirm = ButtonManager.Create(this.FindControl("btnConfirm")); PageTitle.AddSiteNameTitle("充值确认"); this.btnConfirm.Click += this.btnConfirm_Click; if (!this.Page.IsPostBack) { if (this.paymentModeId == 0 || this.balance == decimal.Zero) { this.Page.Response.Redirect("/"); } else { PaymentModeInfo paymentMode = TradeHelper.GetPaymentMode(this.paymentModeId); this.litUserName.Text = HiContext.Current.User.UserName; if (paymentMode != null) { this.lblPaymentName.Text = paymentMode.Name; this.lblBlance.Money = this.balance; } } } }
protected override void AttachChildControls() { PageTitle.AddSiteNameTitle("团购列表"); 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 = (AppshopTemplatedRepeater)this.FindControl("rptGroupBuyProducts"); this.txtTotal = (HtmlInputHidden)this.FindControl("txtTotal"); this.rptCategories = (AppshopTemplatedRepeater)this.FindControl("rptCategories"); if (this.rptCategories != null) { IEnumerable <CategoryInfo> subCategories = CatalogHelper.GetSubCategories(this.categoryId); this.rptCategories.DataSource = subCategories; this.rptCategories.DataBind(); } int page = default(int); if (!int.TryParse(this.Page.Request.QueryString["page"], out page)) { page = 1; } int size = default(int); if (!int.TryParse(this.Page.Request.QueryString["size"], out size)) { size = 10; } int num = default(int); this.rptProducts.DataSource = ProductBrowser.GetGroupBuyProducts(this.categoryId, this.keyWord, page, size, out num, true); this.rptProducts.DataBind(); this.txtTotal.SetWhenIsNotNull(num.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("品牌详情"); }
protected override void AttachChildControls() { int num = default(int); int.TryParse(HttpContext.Current.Request.QueryString.Get("id"), out num); MemberInfo user = HiContext.Current.User; if (user.UserId == 0) { HttpContext.Current.Response.Redirect("login.aspx?ReturnUrl=/Vshop/Activity.aspx?id=" + num); } else { VActivityInfo activity = VshopBrowser.GetActivity(num); if (activity == null) { this.Page.ClientScript.RegisterStartupScript(base.GetType(), "myscript", "<script>$(function(){alert_h(\"活动还未开始或者已经结束!\",function(){window.location.href=\"/vshop/default.aspx\";});});</script>"); } else if (activity.MaxValue <= VshopBrowser.GetUserPrizeCount(num)) { this.Page.ClientScript.RegisterStartupScript(base.GetType(), "myscript", "<script>$(function(){alert_h(\"报名人数已达到限制人数!\",function(){window.location.href=\"/vshop/default.aspx\";});});</script>"); } else { this.img = (HiImage)this.FindControl("img"); this.litDescription = (Literal)this.FindControl("litDescription"); this.img.ImageUrl = activity.PicUrl; this.litDescription.Text = activity.Description; 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() { 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 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 AttachChildControls() { if (!int.TryParse(this.Page.Request.QueryString["BrandId"], out this.BrandId)) { base.GotoResourceNotFound(""); } this.imgUrl = (HiImage)this.FindControl("imgUrl"); this.rptProducts = (AppshopTemplatedRepeater)this.FindControl("rptProducts"); this.litBrandDetail = (Literal)this.FindControl("litBrandDetail"); this.txtTotal = (HtmlInputHidden)this.FindControl("txtTotal"); BrandCategoryInfo brandCategory = CatalogHelper.GetBrandCategory(this.BrandId); this.litBrandDetail.SetWhenIsNotNull(brandCategory.Description); this.imgUrl.ImageUrl = brandCategory.Logo; int pageNumber = default(int); if (!int.TryParse(this.Page.Request.QueryString["page"], out pageNumber)) { pageNumber = 1; } int maxNum = default(int); if (!int.TryParse(this.Page.Request.QueryString["size"], out maxNum)) { maxNum = 20; } DbQueryResult brandProducts = ProductBrowser.GetBrandProducts(this.BrandId, pageNumber, maxNum); this.rptProducts.DataSource = brandProducts.Data; this.rptProducts.DataBind(); this.txtTotal.SetWhenIsNotNull(brandProducts.TotalRecords.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 = (Literal)this.FindControl("litContent"); this.rptProducts = (AppshopTemplatedRepeater)this.FindControl("rptCountDownProducts"); this.txtTotal = (HtmlInputHidden)this.FindControl("txtTotal"); string text = this.Page.Request["lat"].ToNullString(); string text2 = this.Page.Request["lng"].ToNullString(); string cityName = this.Page.Request["city"].ToNullString(); string address = this.Page.Request["address"].ToNullString(); if (!string.IsNullOrEmpty(text) && !string.IsNullOrEmpty(text2)) { RegionInfo regionByCityAddress = RegionHelper.GetRegionByCityAddress(cityName, address); if (regionByCityAddress != null) { int num = regionByCityAddress.RegionId; if (regionByCityAddress.FullRegionPath.Split(',').Length >= 2) { num = regionByCityAddress.FullRegionPath.Split(',')[1].ToInt(0); } WebHelper.SetCookie("UserCoordinateCookie", "CityRegionId", num.ToNullString(), null); WebHelper.SetCookie("UserCoordinateCookie", "RegionId", regionByCityAddress.RegionId.ToNullString(), null); WebHelper.SetCookie("UserCoordinateCookie", "FullRegionPath", regionByCityAddress.FullRegionPath, null); } WebHelper.SetCookie("UserCoordinateCookie", "NewCoordinate", $"{text},{text2}", null); } this.rptCategories = (AppshopTemplatedRepeater)this.FindControl("rptCategories"); if (this.rptCategories != null) { IEnumerable <CategoryInfo> subCategories = CatalogHelper.GetSubCategories(this.categoryId); this.rptCategories.DataSource = subCategories; this.rptCategories.DataBind(); } int page = default(int); if (!int.TryParse(this.Page.Request.QueryString["page"], out page)) { page = 1; } int size = default(int); if (!int.TryParse(this.Page.Request.QueryString["size"], out size)) { size = 10; } int storeId = this.Page.Request.QueryString["StoreId"].ToInt(0); int num2 = default(int); DataTable countDownProductList = PromoteHelper.GetCountDownProductList(this.categoryId, this.keyWord, page, size, storeId, out num2, false); this.rptProducts.ItemDataBound += this.rptProduct_ItemDataBound; this.rptProducts.DataSource = countDownProductList; this.rptProducts.DataBind(); this.txtTotal.SetWhenIsNotNull(num2.ToString()); PageTitle.AddSiteNameTitle("限时抢购"); }
protected override void AttachChildControls() { PageTitle.AddSiteNameTitle("店铺中心"); int currentMemberUserId = Globals.GetCurrentMemberUserId(); DistributorsInfo userIdDistributors = DistributorsBrower.GetUserIdDistributors(currentMemberUserId); if (userIdDistributors != null) { this.litTodayOrdersNum = (Literal)this.FindControl("litTodayOrdersNum"); OrderQuery query = new OrderQuery { UserId = new int?(currentMemberUserId), Status = OrderStatus.Today }; this.litTodayOrdersNum.Text = DistributorsBrower.GetDistributorOrderCount(query).ToString(); this.imglogo = (HiImage)this.FindControl("imglogo"); this.imgGrade = (Image)this.FindControl("imgGrade"); this.litStroeName = (Literal)this.FindControl("litStroeName"); this.saletotal = (FormatedMoneyLabel)this.FindControl("saletotal"); this.refrraltotal = (FormatedMoneyLabel)this.FindControl("refrraltotal"); this.litStoreNum = (Literal)this.FindControl("litStoreNum"); this.litdistirbutors = (Literal)this.FindControl("litdistirbutors"); this.litQRcode = (Literal)this.FindControl("litQRcode"); this.litOrders = (Literal)this.FindControl("litOrders"); this.litdistirbutors.Text = "<li><a href=\"ChirldrenDistributors.aspx\" class=\"shop-underling\">我的下属</a></li>"; this.litQRcode.Text = "<li><a href=\"QRcode.aspx?ReferralId=" + userIdDistributors.UserId + "\" class=\"shop-qr\">店铺推广码</a></li>"; this.litStroeName.Text = userIdDistributors.StoreName; this.saletotal.Money = userIdDistributors.OrdersTotal; DistributorGradeInfo distributorGradeInfo = DistributorGradeBrower.GetDistributorGradeInfo(userIdDistributors.DistriGradeId); if ((distributorGradeInfo != null) && (distributorGradeInfo.Ico.Length > 10)) { this.imgGrade.ImageUrl = distributorGradeInfo.Ico; } else { this.imgGrade.Visible = false; } if (!string.IsNullOrEmpty(userIdDistributors.Logo)) { this.imglogo.ImageUrl = userIdDistributors.Logo; } else { SiteSettings masterSettings = SettingsManager.GetMasterSettings(false); if (!string.IsNullOrEmpty(masterSettings.DistributorLogoPic)) { this.imglogo.ImageUrl = masterSettings.DistributorLogoPic.Split(new char[] { '|' })[0]; } } this.litStoreNum.Text = DistributorsBrower.GetDistributorNum(DistributorGrade.All).ToString(); this.refrraltotal.Money = DistributorsBrower.GetUserCommissions(userIdDistributors.UserId, DateTime.Now); if (userIdDistributors.ReferralStatus == 1) { this.litOrders.Text = "style=\"display:none;\""; } } }
protected override void AttachChildControls() { this.itemID = Globals.RequestQueryNum("iid"); this.singleID = Globals.RequestQueryNum("sid"); this.imgUrl = (HiImage)this.FindControl("imgUrl"); this.litContent = (Literal)this.FindControl("litContent"); this.LitJs = (Literal)this.FindControl("LitJs"); if (this.singleID > 0) { ArticleInfo articleInfo = ArticleHelper.GetArticleInfo(this.singleID); if (articleInfo != null) { this.htmlTitle = articleInfo.Title; this.imgUrl.ImageUrl = articleInfo.ImageUrl; this.litContent.Text = articleInfo.Content; string imageUrl = articleInfo.ImageUrl; if (!imageUrl.ToLower().StartsWith("http")) { imageUrl = Globals.GetWebUrlStart() + imageUrl; } string str2 = Globals.ReplaceHtmlTag(articleInfo.Memo, 50); this.LitJs.Text = "<script>wxinshare_title ='" + this.Page.Server.HtmlEncode(this.htmlTitle.Replace("\n", "").Replace("\r", "")) + "';wxinshare_desc = '" + this.Page.Server.HtmlEncode(str2.Replace("\n", "").Replace("\r", "")) + "';wxinshare_link = location.href;wxinshare_imgurl = '" + imageUrl + "';</script>"; } else { base.GotoResourceNotFound(""); } } else if (this.itemID > 0) { ArticleItemsInfo articleItemsInfo = ArticleHelper.GetArticleItemsInfo(this.itemID); if (articleItemsInfo != null) { this.htmlTitle = articleItemsInfo.Title; this.imgUrl.ImageUrl = articleItemsInfo.ImageUrl; this.litContent.Text = articleItemsInfo.Content; string str3 = articleItemsInfo.ImageUrl; if (!str3.ToLower().StartsWith("http")) { str3 = Globals.GetWebUrlStart() + str3; } string str4 = Globals.ReplaceHtmlTag(articleItemsInfo.Content, 50); this.LitJs.Text = "<script>wxinshare_title ='" + this.Page.Server.HtmlEncode(this.htmlTitle.Replace("\n", "").Replace("\r", "")) + "';wxinshare_desc = '" + this.Page.Server.HtmlEncode(str4.Replace("\n", "").Replace("\r", "")) + "';wxinshare_link = location.href;wxinshare_imgurl = '" + str3 + "';</script>"; } else { base.GotoResourceNotFound(""); } } else { base.GotoResourceNotFound(""); } PageTitle.AddSiteNameTitle(this.htmlTitle); }
protected override void AttachChildControls() { int num; int num2; int num3; int.TryParse(this.Page.Request.QueryString["categoryId"], out this.categoryId); this.keyWord = this.Page.Request.QueryString["keyWord"]; this.pIds = this.Page.Request.QueryString["pIds"]; if (!string.IsNullOrWhiteSpace(this.keyWord)) { this.keyWord = this.keyWord.Trim(); } this.imgUrl = (HiImage)this.FindControl("imgUrl"); this.litContent = (Literal)this.FindControl("litContent"); this.rptProducts = (VshopTemplatedRepeater)this.FindControl("rptProducts"); this.rptCategories = (VshopTemplatedRepeater)this.FindControl("rptCategories"); this.rptCategoryList = (VshopTemplatedRepeater)this.FindControl("rptCategoryList"); this.txtTotalPages = (HtmlInputHidden)this.FindControl("txtTotal"); string str = this.Page.Request.QueryString["sort"]; if (string.IsNullOrWhiteSpace(str)) { str = "DisplaySequence"; } string str2 = this.Page.Request.QueryString["order"]; if (string.IsNullOrWhiteSpace(str2)) { str2 = "desc"; } if (!int.TryParse(this.Page.Request.QueryString["page"], out num)) { num = 1; } if (!int.TryParse(this.Page.Request.QueryString["size"], out num2)) { num2 = 20; } IList <CategoryInfo> maxSubCategories = CategoryBrowser.GetMaxSubCategories(this.categoryId, wid, 0x3e8); this.rptCategories.DataSource = maxSubCategories; this.rptCategories.DataBind(); DataSet categoryList = CategoryBrowser.GetCategoryList(wid); this.rptCategoryList.ItemDataBound += new RepeaterItemEventHandler(this.rptCategoryList_ItemDataBound); this.rptCategoryList.DataSource = categoryList; this.rptCategoryList.DataBind(); this.rptProducts.DataSource = ProductBrowser.GetProducts(this.wid, MemberProcessor.GetCurrentMember(), null, new int?(this.categoryId), this.keyWord, num, num2, out num3, str, str2, this.pIds); this.rptProducts.DataBind(); this.txtTotalPages.SetWhenIsNotNull(num3.ToString()); PageTitle.AddSiteNameTitle("商品列表"); }
protected override void AttachChildControls() { if (!int.TryParse(this.Page.Request.QueryString["giftId"], out this.giftId)) { base.GotoResourceNotFound(); } this.litGiftTite = (Literal)this.FindControl("litGiftTite"); this.litGiftName = (Literal)this.FindControl("litGiftName"); this.lblMarkerPrice = (FormatedMoneyLabel)this.FindControl("lblMarkerPrice"); this.litNeedPoint = (Label)this.FindControl("litNeedPoint"); this.litCurrentPoint = (Label)this.FindControl("litCurrentPoint"); this.litShortDescription = (Literal)this.FindControl("litShortDescription"); this.litDescription = (Literal)this.FindControl("litDescription"); this.imgGiftImage = (HiImage)this.FindControl("imgGiftImage"); this.btnChage = (Button)this.FindControl("btnChage"); this.btnChage.Click += new EventHandler(this.btnChage_Click); GiftInfo gift = ProductBrowser.GetGift(this.giftId); if (gift == null) { this.Page.Response.Redirect(Globals.ApplicationPath + "/ResourceNotFound.aspx?errorMsg=" + Globals.UrlEncode("该件礼品已经不再参与积分兑换;或被管理员删除")); } else { if (!this.Page.IsPostBack) { this.litGiftName.Text = gift.Name; this.lblMarkerPrice.Money = gift.MarketPrice; this.litNeedPoint.Text = gift.NeedPoint.ToString(); this.litShortDescription.Text = gift.ShortDescription; this.litDescription.Text = gift.LongDescription; this.imgGiftImage.ImageUrl = gift.ThumbnailUrl310; this.LoadPageSearch(gift); } if (((HiContext.Current.User.UserRole == UserRole.Member) || (HiContext.Current.User.UserRole == UserRole.Underling)) && (gift.NeedPoint > 0)) { this.btnChage.Enabled = true; this.btnChage.Text = "立即兑换"; this.litCurrentPoint.Text = ((Member)HiContext.Current.User).Points.ToString(); } else if (gift.NeedPoint <= 0) { this.btnChage.Enabled = false; this.btnChage.Text = "礼品不允许兑换"; } else { this.btnChage.Enabled = false; this.btnChage.Text = "请登录方能兑换"; this.litCurrentPoint.Text = string.Format("<a href=\"{0}\">请登录</a>", Globals.ApplicationPath + "/Login.aspx"); } } }
protected override void AttachChildControls() { if (!int.TryParse(this.Page.Request.QueryString["ReferralId"], out this.userId)) { base.GotoResourceNotFound(""); } MemberInfo member = MemberProcessor.GetMember(this.userId, true); if (member != null) { DistributorsInfo userIdDistributors = DistributorsBrower.GetUserIdDistributors(member.UserId); if (userIdDistributors != null) { Literal literal = (Literal)this.FindControl("RealName"); literal.Text = member.RealName; if (string.IsNullOrEmpty(member.RealName)) { literal.Text = member.UserName; } Literal literal2 = (Literal)this.FindControl("StroeDesc"); Literal literal3 = (Literal)this.FindControl("StoreName"); literal2.Text = userIdDistributors.StoreDescription; literal3.Text = userIdDistributors.StoreName; HiImage image = (HiImage)this.FindControl("imgHead"); HiImage image2 = (HiImage)this.FindControl("imgCode"); Literal literal1 = (Literal)this.FindControl("litStoreUrl"); if (!string.IsNullOrEmpty(member.UserHead)) { image.ImageUrl = member.UserHead; } else { MemberInfo currentMember = MemberProcessor.GetCurrentMember(); if (((currentMember != null) && (currentMember.UserId == this.userId)) && this.Page.Request.UserAgent.ToLower().Contains("micromessenger")) { HttpContext.Current.Response.Redirect("ReGetWeiXinUserInfos.aspx?returnUrl=StoreCard.aspx%3fUserId%3d" + this.userId); } } string str2 = Globals.FullPath("/Default.aspx?ReferralId=" + userIdDistributors.UserId); image2.ImageUrl = "http://s.jiathis.com/qrcode.php?url=" + str2; } else { base.GotoResourceNotFound(""); } } else { base.GotoResourceNotFound(""); } PageTitle.AddSiteNameTitle("掌柜名片"); }
protected override void AttachChildControls() { if (!int.TryParse(this.Page.Request.QueryString["productID"], out this.productId)) { base.GotoResourceNotFound(); } this.lblProductNameLinkText = (System.Web.UI.WebControls.Label) this.FindControl("lblProductNameLinkText"); this.hlinkProductTitle = (System.Web.UI.WebControls.HyperLink) this.FindControl("hlinkProductTitle"); this.hlinkProductContent = (System.Web.UI.WebControls.HyperLink) this.FindControl("hlinkProductContent"); this.lblImgUrl = (System.Web.UI.WebControls.Label) this.FindControl("lblImgUrl"); this.lblUrl = (System.Web.UI.WebControls.Label) this.FindControl("lblUrl"); this.lblUrl2 = (System.Web.UI.WebControls.Label) this.FindControl("lblUrl2"); this.imgUrl = (HiImage)this.FindControl("imgUrl"); if (!this.Page.IsPostBack) { ProductInfo productSimpleInfo = ProductBrowser.GetProductSimpleInfo(this.productId); if (productSimpleInfo == null) { base.GotoResourceNotFound(); } PageTitle.AddSiteNameTitle(productSimpleInfo.ProductName + " 推荐到博客", Hidistro.Membership.Context.HiContext.Current.Context); string text = "productDetails"; if (productSimpleInfo.SaleStatus == ProductSaleStatus.UnSale) { text = "unproductdetails"; } string text2 = Globals.GetSiteUrls().UrlData.FormatUrl(text, new object[] { this.productId }); this.hlinkProductTitle.Text = (this.hlinkProductContent.Text = productSimpleInfo.ProductName); this.hlinkProductTitle.NavigateUrl = (this.hlinkProductContent.NavigateUrl = text2); this.lblProductNameLinkText.Text = string.Format("插入这段代码,可以在你的博客中显示“{0}”的文字链接", string.Format("<a href=\"{0}\" target=\"_blank\">{1}</a>", text2, "Text")); this.imgUrl.ImageUrl = productSimpleInfo.ImageUrl1; if (!string.IsNullOrEmpty(productSimpleInfo.ImageUrl1)) { this.lblImgUrl.Text = Globals.FullPath(Globals.ApplicationPath + this.imgUrl.ImageUrl); } Hidistro.Membership.Core.IUser user = Hidistro.Membership.Context.HiContext.Current.User; if (user.UserRole == Hidistro.Membership.Core.Enums.UserRole.Member || user.UserRole == Hidistro.Membership.Core.Enums.UserRole.Underling) { this.lblUrl.Text = (this.lblUrl2.Text = Globals.FullPath(System.Web.HttpContext.Current.Request.Url.PathAndQuery).Replace("BlogIt", text) + "&ReferralUserId=" + user.UserId); } else { this.lblUrl.Text = (this.lblUrl2.Text = Globals.FullPath(Globals.GetSiteUrls().UrlData.FormatUrl(text, new object[] { this.productId }))); } } }
protected override void AttachChildControls() { if (!int.TryParse(this.Page.Request.QueryString["supplierId"], out this.supplierId)) { base.GotoResourceNotFound("店铺已不存在"); } //店铺收藏数 this.litSupplierFavCount = (System.Web.UI.WebControls.Literal) this.FindControl("litSupplierFavCount"); //店铺logo this.imgSupplierLogo = (HiImage)this.FindControl("imgSupplierLogo"); this.isCollect = (System.Web.UI.WebControls.Literal) this.FindControl("isCollect"); //店铺名称 this.litSupplierName = (System.Web.UI.WebControls.Literal) this.FindControl("litSupplierName"); //店主名称 this.litSupplierOwner = (System.Web.UI.WebControls.Literal) this.FindControl("litSupplierOwner"); //店铺地址 this.litSupplierAddress = (System.Web.UI.WebControls.Literal) this.FindControl("litSupplierAddress"); //开店时间 this.litSupplierCreateTime = (System.Web.UI.WebControls.Literal) this.FindControl("litSupplierCreateTime"); Member member = HiContext.Current.User as Member; int userId = 0; if (member != null) { userId = member.UserId; } AppSupplierInfo info = SupplierHelper.GetAppSupplier(supplierId, userId); if (info != null) { this.litSupplierFavCount.Text = info.CollectCount > 0 ? info.CollectCount.ToString() : "0"; this.imgSupplierLogo.ImageUrl = info.Logo; this.litSupplierName.Text = info.ShopName; this.litSupplierOwner.Text = info.ShopOwner; this.isCollect.Text = info.IsCollect.ToString(); if (info.CreateDate.HasValue) { this.litSupplierAddress.Text = RegionHelper.GetFullRegion(info.County, ",").Split(',')[0]; } if (info.County > 0) { this.litSupplierCreateTime.Text = info.CreateDate.Value.ToString("yyyy-MM-dd HH:mm:ss"); } } else { base.GotoResourceNotFound("店铺已不存在"); } }
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 = (AliOHTemplatedRepeater)this.FindControl("rptProducts"); this.rptCategories = (AliOHTemplatedRepeater)this.FindControl("rptCategories"); System.Collections.Generic.IList <CategoryInfo> maxSubCategories = CategoryBrowser.GetMaxSubCategories(this.categoryId, 1000); this.rptCategories.DataSource = maxSubCategories; this.rptCategories.DataBind(); PageTitle.AddSiteNameTitle("分类搜索页"); }
protected override void Render(HtmlTextWriter writer) { if (!string.IsNullOrEmpty(HiContext.Current.SiteSettings.LogoUrl)) { HiImage image = new HiImage(); image.ImageUrl = HiContext.Current.SiteSettings.LogoUrl; writer.Write(string.Format("<a href=\"{0}\">", Globals.GetSiteUrls().UrlData.FormatUrl("home"))); image.RenderControl(writer); writer.Write("</a>"); } // writer.Write("<script type=\"text/javascript\" src=\"http://v3.jiathis.com/code/jiathis_r.js?uid=1334751641000509&move=0&btn=r4.gif\" charset=\"utf-8\"></script>"); }
private void btnPicDelete_Click(object sender, EventArgs e) { SiteSettings masterSettings = SettingsManager.GetMasterSettings(); if (!string.IsNullOrEmpty(masterSettings.WeiXinCodeImageUrl)) { ResourcesHelper.DeleteImage(masterSettings.WeiXinCodeImageUrl); this.btnPicDelete.Visible = false; SiteSettings siteSettings = masterSettings; HiImage hiImage = this.imgPic; string text2 = siteSettings.WeiXinCodeImageUrl = (hiImage.ImageUrl = string.Empty); SettingsManager.Save(masterSettings); } }
protected override void AttachChildControls() { if (!int.TryParse(this.Page.Request.QueryString["BrandId"], out this.BrandId)) { base.GotoResourceNotFound(""); } this.imgUrl = (HiImage)this.FindControl("imgUrl"); this.litBrandDetail = (System.Web.UI.WebControls.Literal) this.FindControl("litBrandDetail"); BrandCategoryInfo brandCategory = CategoryBrowser.GetBrandCategory(this.BrandId); this.litBrandDetail.SetWhenIsNotNull(brandCategory.Description); this.imgUrl.ImageUrl = brandCategory.Logo; PageTitle.AddSiteNameTitle("品牌详情"); }
protected override void AttachChildControls() { 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("rptProducts"); this.rptCategories = (VshopTemplatedRepeater)this.FindControl("rptCategories"); this.Page.Session["stylestatus"] = "4"; switch (Hidistro.Core.SettingsManager.GetMasterSettings(true).VTheme.ToLower()) { case "common": DataTable dt = CategoryBrowser.GetCategoriesRange(ProductInfo.ProductRanage.NormalSelect); this.rptCategories.DataSource = dt; this.rptCategories.DataBind(); int total = 0; if (categoryId == 0) { if (dt.Rows.Count > 0) { int FirstCategoryID = Convert.ToInt32(dt.Rows[0]["categoryId"]); this.rptProducts.DataSource = ProductBrowser.GetProducts(MemberProcessor.GetCurrentMember(), null, 0, FirstCategoryID, this.keyWord, 1, 200, out total, "ShowSaleCounts", "desc"); this.rptProducts.DataBind(); } } else { this.rptProducts.DataSource = ProductBrowser.GetProducts(MemberProcessor.GetCurrentMember(), null, 0, categoryId, this.keyWord, 1, 200, out total, "ShowSaleCounts", "desc"); this.rptProducts.DataBind(); } break; default: this.rptCategories.ItemDataBound += new RepeaterItemEventHandler(this.rptCategories_ItemDataBound); if (this.Page.Request.QueryString["TypeId"] != null) { this.rptCategories.DataSource = CategoryBrowser.GetCategoriesByPruductType(100, Convert.ToInt32(this.Page.Request.QueryString["TypeId"])); this.rptCategories.DataBind(); } else { IList <CategoryInfo> maxSubCategories = CategoryBrowser.GetMaxSubCategoriesRange(this.categoryId, 0x3e8, DistributorsBrower.GetCurrStoreProductRange()); this.rptCategories.DataSource = maxSubCategories; this.rptCategories.DataBind(); } PageTitle.AddSiteNameTitle("分类搜索页"); break; } }
protected override void AttachChildControls() { this.imgBG = (HiImage)this.FindControl("imgBG"); this.imgQR = (HiImage)this.FindControl("imgQR"); this.litLogo = (Literal)this.FindControl("litLogo"); this.litVipCardPrefix = (Literal)this.FindControl("litVipCardPrefix"); this.litExpenditure = (Literal)this.FindControl("litExpenditure"); this.litPoints = (Literal)this.FindControl("litPoints"); this.litCouponsCount = (Literal)this.FindControl("litCouponsCount"); this.litGrade = (Literal)this.FindControl("litGrade"); this.pnlInfo = (Panel)this.FindControl("pnlInfo"); this.pnlCoupons = (Panel)this.FindControl("pnlCoupons"); this.litVipCardPrefix = (Literal)this.FindControl("litVipCardPrefix"); this.litVipRemark = (Literal)this.FindControl("litVipRemark"); this.pnlCoupons.Visible = false; this.pnlInfo.Visible = true; decimal expenditure = 0M; int userHistoryPoint = 0; int count = 0; MemberInfo currentMember = MemberProcessor.GetCurrentMember(); if (currentMember != null) { userHistoryPoint = MemberProcessor.GetUserHistoryPoint(currentMember.UserId); expenditure = currentMember.Expenditure; DataTable userCoupons = MemberProcessor.GetUserCoupons(currentMember.UserId, 0); if (userCoupons != null) { count = userCoupons.Rows.Count; } } if ((currentMember != null) && !string.IsNullOrEmpty(currentMember.VipCardNumber)) { this.pnlCoupons.Visible = true; this.pnlInfo.Visible = false; this.litVipCardPrefix.Text = currentMember.VipCardNumber; this.litGrade.Text = MemberProcessor.GetMemberGrade(currentMember.GradeId).Name; } SiteSettings masterSettings = SettingsManager.GetMasterSettings(true); this.imgBG.ImageUrl = masterSettings.VipCardBG; this.litLogo.Text = masterSettings.VipCardLogo; this.imgQR.ImageUrl = masterSettings.VipCardQR; this.litExpenditure.Text = expenditure.ToString("F2"); this.litPoints.Text = userHistoryPoint.ToString(); this.litCouponsCount.Text = count.ToString(); this.litVipRemark.Text = masterSettings.VipRemark; 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 = (Literal)this.FindControl("litContent"); this.rptProducts = (VshopTemplatedRepeater)this.FindControl("rptProducts"); this.rptCategories = (VshopTemplatedRepeater)this.FindControl("rptCategories"); this.Page.Session["stylestatus"] = "4"; this.rptCategories.ItemDataBound += new RepeaterItemEventHandler(this.rptCategories_ItemDataBound); IList <CategoryInfo> maxSubCategories = CategoryBrowser.GetMaxSubCategories(this.categoryId, 0x3e8); this.rptCategories.DataSource = maxSubCategories; this.rptCategories.DataBind(); PageTitle.AddSiteNameTitle("分类搜索页"); }
protected override void AttachChildControls() { if (!int.TryParse(this.Page.Request.QueryString["TopicId"], out this.topicId)) { base.GotoResourceNotFound(""); } this.imgUrl = (HiImage)this.FindControl("imgUrl"); this.litContent = (System.Web.UI.WebControls.Literal) this.FindControl("litContent"); //this.litPager = (System.Web.UI.WebControls.Literal)this.FindControl("litPager"); //this.rptProducts = (VshopTemplatedRepeater)this.FindControl("rptProducts"); TopicInfo topic = VshopBrowser.GetTopic(this.topicId); if (topic == null) { base.GotoResourceNotFound(""); } if (HiContext.Current.User.UserRole == UserRole.Member && ((Member)HiContext.Current.User).ReferralStatus == 2 && string.IsNullOrEmpty(this.Page.Request.QueryString["ReferralUserId"])) { string text = System.Web.HttpContext.Current.Request.Url.ToString(); if (text.IndexOf("?") > -1) { text = text + "&ReferralUserId=" + HiContext.Current.User.UserId; } else { text = text + "?ReferralUserId=" + HiContext.Current.User.UserId; } base.RegisterShareScript(topic.IconUrl, text, topic.Content, topic.Title); } this.imgUrl.ImageUrl = topic.MobileBannerImageUrl; this.litContent.Text = topic.Content; //this.rptProducts.DataSource = ProductBrowser.GetTopicProducts(this.topicId, new VTemplateHelper().GetTopicProductMaxNum()); //int total = 0; //int pageNumber = 0; //int pageSize = new VTemplateHelper().GetTopicProductMaxNum(); //if (!int.TryParse(this.Page.Request.QueryString["pageNumber"], out pageNumber)) //{ // pageNumber = 1; //} //this.rptProducts.DataSource = ProductBrowser.GetProducts(this.topicId, null, "", pageNumber, pageSize, out total, " sort2 ",true,"asc");//分页查询 //int totalPage = total % pageSize != 0 ? (total / pageSize + 1) : (total / pageSize);//总页数 //this.litPager.Text = string.Format("<li class=\"previous {0}\"><a href=\"/Vshop/Activity1.aspx?TopicId={1}&pageNumber={2}\">上一页</a></li><li class=\"next {3}\"><a href=\"/Vshop/Activity1.aspx?TopicId={1}&pageNumber={4}\">下一页</a></li>", pageNumber > 1 ? "" : "disabled", topicId, pageNumber - 1, totalPage - pageNumber > 0 ? "" : "disabled", pageNumber + 1); //this.rptProducts.DataBind(); PageTitle.AddSiteNameTitle(topic.Title); }
protected override void AttachChildControls() { 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 = (System.Web.UI.WebControls.Literal) this.FindControl("litContent"); this.rptProducts = (AliOHTemplatedRepeater)this.FindControl("rptProducts"); this.rptCategories = (AliOHTemplatedRepeater)this.FindControl("rptCategories"); this.txtTotalPages = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("txtTotal"); string text = this.Page.Request.QueryString["sort"]; if (string.IsNullOrWhiteSpace(text)) { text = "DisplaySequence"; } string text2 = this.Page.Request.QueryString["order"]; if (string.IsNullOrWhiteSpace(text2)) { text2 = "desc"; } 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; } System.Collections.Generic.IList <CategoryInfo> maxSubCategories = CategoryBrowser.GetMaxSubCategories(this.categoryId, 1000); this.rptCategories.DataSource = maxSubCategories; this.rptCategories.DataBind(); int num; this.rptProducts.DataSource = ProductBrowser.GetProducts(null, new int?(this.categoryId), this.keyWord, pageNumber, maxNum, out num, text, text2); this.rptProducts.DataBind(); this.txtTotalPages.SetWhenIsNotNull(num.ToString()); PageTitle.AddSiteNameTitle("分类搜索页"); }
protected override void AttachChildControls() { int num; int.TryParse(HttpContext.Current.Request.QueryString.Get("id"), out num); ActivityInfo activity = VshopBrowser.GetActivity(num); if (activity == null) { base.GotoResourceNotFound(""); } this.img = (HiImage)this.FindControl("img"); this.litDescription = (Literal)this.FindControl("litDescription"); this.img.ImageUrl = activity.PicUrl; this.litDescription.Text = activity.Description; PageTitle.AddSiteNameTitle("微报名"); }
protected override void AttachChildControls() { if (!int.TryParse(this.Page.Request.QueryString["messageId"], out this.messageId)) { base.GotoResourceNotFound(""); } this.imgUrl = (HiImage)this.FindControl("imgUrl"); this.litContent = (System.Web.UI.WebControls.Literal) this.FindControl("litContent"); MessageInfo message = VshopBrowser.GetMessage(this.messageId); if (message == null) { base.GotoResourceNotFound(""); } this.imgUrl.ImageUrl = message.ImageUrl; this.litContent.Text = message.Content; PageTitle.AddSiteNameTitle("内容详情"); }