Esempio n. 1
0
 protected override void AttachChildControls()
 {
     int num;
     int num2;
     int num3;
     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 = (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;
     if (!int.TryParse(this.Page.Request.QueryString["page"], out num))
     {
         num = 1;
     }
     if (!int.TryParse(this.Page.Request.QueryString["size"], out num2))
     {
         num2 = 20;
     }
     this.rptProducts.DataSource = ProductBrowser.GetBrandProducts(MemberProcessor.GetCurrentMember(), new int?(this.BrandId), num, num2, out num3);
     this.rptProducts.DataBind();
     this.txtTotal.SetWhenIsNotNull(num3.ToString());
     PageTitle.AddSiteNameTitle("品牌详情");
 }
Esempio n. 2
0
 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("团购搜索页");
 }
Esempio n. 3
0
 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));
             }
         }
     }
 }
Esempio n. 4
0
 protected override void AttachChildControls()
 {
     PageTitle.AddSiteNameTitle("分销中心");
     DistributorsInfo userIdDistributors = DistributorsBrower.GetUserIdDistributors(MemberProcessor.GetCurrentMember().UserId);
     if (userIdDistributors != null)
     {
         this.imglogo = (HiImage) this.FindControl("imglogo");
         this.litGrade = (DistributorGradeLitral) this.FindControl("litGrade");
         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");
         if (userIdDistributors.DistributorGradeId != DistributorGrade.ThreeDistributor)
         {
             this.litdistirbutors.Text = "<a href=\"ChirldrenDistributors.aspx\" class=\"list-group-item\">下级分销商<span class=\"glyphicon glyphicon-chevron-right\"></span></a>";
         }
         this.litQRcode.Text = "<a href=\"QRcode.aspx?ReferralId=" + userIdDistributors.UserId + "\" class=\"list-group-item\">店铺二维码<span class=\"glyphicon glyphicon-chevron-right\"></span></a>";
         this.litStroeName.Text = userIdDistributors.StoreName;
         this.refrraltotal.Money = userIdDistributors.ReferralBlance;
         this.saletotal.Money = userIdDistributors.OrdersTotal;
         this.litGrade.GradeId = userIdDistributors.DistributorGradeId;
         if (userIdDistributors.Logo != "")
         {
             this.imglogo.ImageUrl = userIdDistributors.Logo;
         }
         this.litStoreNum.Text = DistributorsBrower.GetDistributorNum(DistributorGrade.All).ToString();
     }
 }
Esempio n. 5
0
 protected override void AttachChildControls()
 {
     this.rptProducts = (VshopTemplatedRepeater) this.FindControl("rptProducts");
     this.img = (HtmlImage) this.FindControl("imgDefaultBg");
     this.pager = (Pager) this.FindControl("pager");
     this.litstorename = (Literal) this.FindControl("litstorename");
     this.litdescription = (Literal) this.FindControl("litdescription");
     this.imgback = (HiImage) this.FindControl("imgback");
     this.imglogo = (HiImage) this.FindControl("imglogo");
     this.Page.Session["stylestatus"] = "3";
     SiteSettings masterSettings = SettingsManager.GetMasterSettings(false);
     PageTitle.AddSiteNameTitle(masterSettings.SiteName);
     this.litstorename.Text = masterSettings.SiteName;
     this.litdescription.Text = masterSettings.ShopIntroduction;
     if (base.referralId <= 0)
     {
         HttpCookie cookie = HttpContext.Current.Request.Cookies["Vshop-ReferralId"];
         if (!((cookie == null) || string.IsNullOrEmpty(cookie.Value)))
         {
             base.referralId = int.Parse(cookie.Value);
         }
     }
     DistributorsInfo userIdDistributors = new DistributorsInfo();
     userIdDistributors = DistributorsBrower.GetUserIdDistributors(base.referralId);
     if ((userIdDistributors != null) && (userIdDistributors.UserId > 0))
     {
         PageTitle.AddSiteNameTitle(userIdDistributors.StoreName);
         this.litdescription.Text = userIdDistributors.StoreDescription;
         this.litstorename.Text = userIdDistributors.StoreName;
         if (userIdDistributors.Logo != "")
         {
             this.imglogo.ImageUrl = userIdDistributors.Logo;
         }
         this.imgback.ImageUrl = userIdDistributors.BackImage;
     }
     if (this.rptProducts != null)
     {
         ProductQuery query = new ProductQuery {
             PageSize = this.pager.PageSize,
             PageIndex = this.pager.PageIndex
         };
         DbQueryResult homeProduct = ProductBrowser.GetHomeProduct(MemberProcessor.GetCurrentMember(), query);
         this.rptProducts.DataSource = homeProduct.Data;
         this.rptProducts.DataBind();
         this.pager.TotalRecords = homeProduct.TotalRecords;
         if (this.pager.TotalRecords <= this.pager.PageSize)
         {
             this.pager.Visible = false;
         }
     }
     if (this.img != null)
     {
         this.img.Src = new VTemplateHelper().GetDefaultBg();
     }
 }
Esempio n. 6
0
 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");
     IList<CategoryInfo> maxSubCategories = CategoryBrowser.GetMaxSubCategories(this.categoryId, 0x3e8);
     this.rptCategories.DataSource = maxSubCategories;
     this.rptCategories.DataBind();
     PageTitle.AddSiteNameTitle("分类搜索页");
 }
Esempio n. 7
0
        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&amp;btn=r4.gif\" charset=\"utf-8\"></script>");
        }
Esempio n. 8
0
 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("微报名");
 }
Esempio n. 9
0
 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 = null;
     gift = ProductBrowser.GetGift(this.giftId);
     if (!this.Page.IsPostBack)
     {
         this.litGiftTite.Text = gift.Name;
         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");
     }
 }
Esempio n. 10
0
 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("会员卡");
 }
Esempio n. 11
0
 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 = (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("内容详情");
 }
Esempio n. 12
0
 protected override void AttachChildControls()
 {
     if (!int.TryParse(this.Page.Request.QueryString["productID"], out this.productId))
     {
         base.GotoResourceNotFound();
     }
     this.lblProductNameLinkText = (Label) this.FindControl("lblProductNameLinkText");
     this.hlinkProductTitle = (HyperLink) this.FindControl("hlinkProductTitle");
     this.hlinkProductContent = (HyperLink) this.FindControl("hlinkProductContent");
     this.lblImgUrl = (Label) this.FindControl("lblImgUrl");
     this.lblUrl = (Label) this.FindControl("lblUrl");
     this.lblUrl2 = (Label) this.FindControl("lblUrl2");
     this.imgUrl = (HiImage) this.FindControl("imgUrl");
     PageTitle.AddTitle("推荐到博客", HiContext.Current.Context);
     if (!this.Page.IsPostBack)
     {
         string name = "productDetails";
         ProductInfo productSimpleInfo = ProductBrowser.GetProductSimpleInfo(this.productId);
         if (productSimpleInfo.SaleStatus == ProductSaleStatus.UnSale)
         {
             name = "unproductdetails";
         }
         string str2 = Globals.GetSiteUrls().UrlData.FormatUrl(name, new object[] { this.productId });
         this.hlinkProductTitle.Text = this.hlinkProductContent.Text = productSimpleInfo.ProductName;
         this.hlinkProductTitle.NavigateUrl = this.hlinkProductContent.NavigateUrl = str2;
         this.lblProductNameLinkText.Text = string.Format("插入这段代码,可以在你的博客中显示“{0}”的文字链接", string.Format("<a href=\"{0}\" target=\"_blank\">{1}</a>", str2, "Text"));
         this.imgUrl.ImageUrl = productSimpleInfo.ImageUrl1;
         if (!string.IsNullOrEmpty(productSimpleInfo.ImageUrl1))
         {
             this.lblImgUrl.Text = Globals.FullPath(Globals.ApplicationPath + this.imgUrl.ImageUrl);
         }
         IUser user = HiContext.Current.User;
         if ((user.UserRole == UserRole.Member) || (user.UserRole == UserRole.Underling))
         {
             this.lblUrl.Text = this.lblUrl2.Text = Globals.FullPath(HttpContext.Current.Request.Url.PathAndQuery).Replace("BlogIt", name) + "&ReferralUserId=" + user.UserId;
         }
         else
         {
             this.lblUrl.Text = this.lblUrl2.Text = Globals.FullPath(Globals.GetSiteUrls().UrlData.FormatUrl(name, new object[] { this.productId }));
         }
     }
 }
Esempio n. 13
0
 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.rptProducts = (VshopTemplatedRepeater) this.FindControl("rptProducts");
     this.rptCategories = (VshopTemplatedRepeater) this.FindControl("rptCategories");
     this.txtTotalPages = (HtmlInputHidden) this.FindControl("txtTotal");
     string str = this.Page.Request.QueryString["sort"];
     if (string.IsNullOrWhiteSpace(str))
     {
         str = "DisplaySequence";
     }
     string str2 = this.Page.Request.QueryString["order"];
     if (string.IsNullOrWhiteSpace(str2))
     {
         str2 = "desc";
     }
     if (!int.TryParse(this.Page.Request.QueryString["page"], out num))
     {
         num = 1;
     }
     if (!int.TryParse(this.Page.Request.QueryString["size"], out num2))
     {
         num2 = 20;
     }
     IList<CategoryInfo> maxSubCategories = CategoryBrowser.GetMaxSubCategories(this.categoryId, 0x3e8);
     this.rptCategories.DataSource = maxSubCategories;
     this.rptCategories.DataBind();
     this.rptProducts.DataSource = ProductBrowser.GetProducts(MemberProcessor.GetCurrentMember(), null, new int?(this.categoryId), this.keyWord, num, num2, out num3, str, str2);
     this.rptProducts.DataBind();
     this.txtTotalPages.SetWhenIsNotNull(num3.ToString());
     PageTitle.AddSiteNameTitle("分类搜索页");
 }
Esempio n. 14
0
 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 = (Literal) this.FindControl("litContent");
     this.rptProducts = (VshopTemplatedRepeater) this.FindControl("rptProducts");
     TopicInfo topic = VshopBrowser.GetTopic(this.topicId);
     if (topic == null)
     {
         base.GotoResourceNotFound("");
     }
     this.imgUrl.ImageUrl = topic.IconUrl;
     this.litContent.Text = topic.Content;
     this.rptProducts.DataSource = ProductBrowser.GetTopicProducts(MemberProcessor.GetCurrentMember(), this.topicId, new VTemplateHelper().GetTopicProductMaxNum());
     this.rptProducts.DataBind();
     PageTitle.AddSiteNameTitle("专题详情");
 }
Esempio n. 15
0
 protected override void AttachChildControls()
 {
     this.imgBig = (HiImage) this.FindControl("imgBig");
     this.imgSmall1 = (HiImage) this.FindControl("imgSmall1");
     this.imgSmall2 = (HiImage) this.FindControl("imgSmall2");
     this.imgSmall3 = (HiImage) this.FindControl("imgSmall3");
     this.imgSmall4 = (HiImage) this.FindControl("imgSmall4");
     this.imgSmall5 = (HiImage) this.FindControl("imgSmall5");
     this.iptPicUrl1 = (HtmlInputHidden) this.FindControl("iptPicUrl1");
     this.iptPicUrl2 = (HtmlInputHidden) this.FindControl("iptPicUrl2");
     this.iptPicUrl3 = (HtmlInputHidden) this.FindControl("iptPicUrl3");
     this.iptPicUrl4 = (HtmlInputHidden) this.FindControl("iptPicUrl4");
     this.iptPicUrl5 = (HtmlInputHidden) this.FindControl("iptPicUrl5");
     if (!this.Page.IsPostBack)
     {
         this.BindData();
     }
 }