示例#1
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    = (System.Web.UI.WebControls.Literal) this.FindControl("litContent");
            this.rptProducts   = (AliOHTemplatedRepeater)this.FindControl("rptGroupBuyProducts");
            this.txtTotal      = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("txtTotal");
            this.rptCategories = (AliOHTemplatedRepeater)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;

            this.rptProducts.DataSource = ProductBrowser.GetGroupBuyProducts(new int?(this.categoryId), this.keyWord, page, size, out num, true);
            this.rptProducts.DataBind();
            this.txtTotal.SetWhenIsNotNull(num.ToString());
            PageTitle.AddSiteNameTitle("团购搜索页");
        }
示例#2
0
        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");
            this.rptProducts = (AliOHTemplatedRepeater)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(this.topicId, new AliohTemplateHelper().GetTopicProductMaxNum());
            this.rptProducts.DataBind();
            PageTitle.AddSiteNameTitle(topic.Title);
        }
示例#3
0
 protected override void AttachChildControls()
 {
     this.rptBrands            = (AliOHTemplatedRepeater)this.FindControl("rptBrands");
     this.rptBrands.DataSource = CategoryBrowser.GetBrandCategories(0, 1000);
     this.rptBrands.DataBind();
     PageTitle.AddSiteNameTitle("品牌列表");
 }
示例#4
0
        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    = (AliOHTemplatedRepeater)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(new int?(this.BrandId), pageNumber, maxNum, out num);
            this.rptProducts.DataBind();
            this.txtTotal.SetWhenIsNotNull(num.ToString());
            PageTitle.AddSiteNameTitle("品牌详情");
        }
示例#5
0
 private void FindControls()
 {
     this.rptProductImages      = (AliOHTemplatedRepeater)this.FindControl("rptProductImages");
     this.litProdcutName        = (System.Web.UI.WebControls.Literal) this.FindControl("litProdcutName");
     this.litShortDescription   = (System.Web.UI.WebControls.Literal) this.FindControl("litShortDescription");
     this.litDescription        = (System.Web.UI.WebControls.Literal) this.FindControl("litDescription");
     this.litSoldCount          = (System.Web.UI.WebControls.Literal) this.FindControl("soldCount");
     this.litprice              = (System.Web.UI.WebControls.Literal) this.FindControl("price");
     this.litcontent            = (System.Web.UI.WebControls.Literal) this.FindControl("content");
     this.litminCount           = (System.Web.UI.WebControls.Literal) this.FindControl("minCount");
     this.litGroupBuyId         = (System.Web.UI.HtmlControls.HtmlInputControl) this.FindControl("litGroupbuyId");
     this.litLeftSeconds        = (System.Web.UI.WebControls.Literal) this.FindControl("leftSeconds");
     this.skuSelector           = (Common_SKUSelector)this.FindControl("skuSelector");
     this.linkDescription       = (System.Web.UI.WebControls.HyperLink) this.FindControl("linkDescription");
     this.expandAttr            = (Common_ExpandAttributes)this.FindControl("ExpandAttributes");
     this.salePrice             = (System.Web.UI.WebControls.Literal) this.FindControl("salePrice");
     this.leftCount             = (System.Web.UI.WebControls.Literal) this.FindControl("leftCount");
     this.minSuccessCount       = (System.Web.UI.WebControls.Literal) this.FindControl("minSuccessCount");
     this.txtProductId          = (System.Web.UI.HtmlControls.HtmlInputControl) this.FindControl("txtProductId");
     this.litConsultationsCount = (System.Web.UI.WebControls.Literal) this.FindControl("litConsultationsCount");
     this.litReviewsCount       = (System.Web.UI.WebControls.Literal) this.FindControl("litReviewsCount");
     this.litMaxCount           = (System.Web.UI.WebControls.Literal) this.FindControl("litMaxCount");
     this.startTime             = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("startTime");
     this.endTime                = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("endTime");
     this.groupBuySoldCount      = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("groupBuySoldCount");
     this.groupBuyMinCount       = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("groupBuyMinCount");
     this.litGroupbuyDescription = (System.Web.UI.WebControls.Literal) this.FindControl("litGroupbuyDescription");
     this.groupBuyMaxCount       = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("groupBuyMaxCount");
 }
示例#6
0
        protected override void AttachChildControls()
        {
            this.rptProducts = (AliOHTemplatedRepeater)this.FindControl("rptProducts");
            this.txtTotal    = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("txtTotal");
            int pageIndex;

            if (!int.TryParse(this.Page.Request.QueryString["page"], out pageIndex))
            {
                pageIndex = 1;
            }
            int pageSize;

            if (!int.TryParse(this.Page.Request.QueryString["size"], out pageSize))
            {
                pageSize = 20;
            }
            DbQueryResult productConsultations = ProductBrowser.GetProductConsultations(new ProductConsultationAndReplyQuery
            {
                UserId    = HiContext.Current.User.UserId,
                IsCount   = true,
                PageIndex = pageIndex,
                PageSize  = pageSize,
                SortBy    = "ConsultationId",
                SortOrder = SortAction.Desc
            });

            this.rptProducts.DataSource = productConsultations.Data;
            this.rptProducts.DataBind();
            this.txtTotal.SetWhenIsNotNull(productConsultations.TotalRecords.ToString());
            PageTitle.AddSiteNameTitle("商品咨询");
        }
示例#7
0
        protected override void AttachChildControls()
        {
            int.TryParse(this.Page.Request.QueryString["categoryId"], out this.categoryId);
            this.txtCategoryName = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("txtCategoryName");
            this.txtCategoryId   = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("txtCategoryId");
            this.keyWord         = this.Page.Request.QueryString["keyWord"];
            if (!string.IsNullOrWhiteSpace(this.keyWord))
            {
                this.keyWord = this.keyWord.Trim();
            }
            this.rptArticles   = (AliOHTemplatedRepeater)this.FindControl("rptArticles");
            this.txtTotalPages = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("txtTotal");
            int pageIndex;

            if (!int.TryParse(this.Page.Request.QueryString["page"], out pageIndex))
            {
                pageIndex = 1;
            }
            int pageSize;

            if (!int.TryParse(this.Page.Request.QueryString["size"], out pageSize))
            {
                pageSize = 20;
            }
            ArticleQuery articleQuery = new ArticleQuery();

            if (!string.IsNullOrEmpty(this.Page.Request.QueryString["CategoryId"]))
            {
                int value = 0;
                if (int.TryParse(this.Page.Request.QueryString["CategoryId"], out value))
                {
                    ArticleCategoryInfo articleCategory = CommentBrowser.GetArticleCategory(value);
                    if (articleCategory != null)
                    {
                        PageTitle.AddSiteNameTitle(articleCategory.Name);
                        articleQuery.CategoryId    = new int?(value);
                        this.txtCategoryId.Value   = value.ToString();
                        this.txtCategoryName.Value = articleCategory.Name;
                    }
                    else
                    {
                        PageTitle.AddSiteNameTitle("文章分类搜索页");
                    }
                }
            }
            articleQuery.Keywords  = this.keyWord;
            articleQuery.PageIndex = pageIndex;
            articleQuery.PageSize  = pageSize;
            articleQuery.SortBy    = "AddedDate";
            articleQuery.SortOrder = SortAction.Desc;
            DbQueryResult articleList = CommentBrowser.GetArticleList(articleQuery);

            this.rptArticles.DataSource = articleList.Data;
            this.rptArticles.DataBind();
            int totalRecords = articleList.TotalRecords;

            this.txtTotalPages.SetWhenIsNotNull(totalRecords.ToString());
        }
示例#8
0
 protected override void AttachChildControls()
 {
     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;
     }
     PageTitle.AddSiteNameTitle("首页");
     this.rptSlide    = (AliOHTemplatedRepeater)this.FindControl("rptSlide");
     this.rptNavigate = (AliOHTemplatedRepeater)this.FindControl("rptNavigate");
     this.rptTopic    = (AliOHTemplatedRepeater)this.FindControl("rptTopics");
     this.rptProducts = (AliOHTemplatedRepeater)this.FindControl("rptProducts");
     this.img         = (System.Web.UI.HtmlControls.HtmlImage) this.FindControl("imgDefaultBg");
     if (this.rptSlide != null)
     {
         this.rptSlide.DataSource = VshopBrowser.GetAllBanners(ClientType.AliOH);
         this.rptSlide.DataBind();
     }
     if (this.rptProducts != null)
     {
         DataTable homeProduct = ProductBrowser.GetHomeProduct(ClientType.AliOH);
         this.rptProducts.DataSource = homeProduct;
         this.rptProducts.DataBind();
     }
     if (this.rptTopic != null)
     {
         DataTable topics = VshopBrowser.GetTopics(ClientType.AliOH);
         this.rptTopic.DataSource = topics;
         this.rptTopic.DataBind();
     }
     if (this.rptNavigate != null)
     {
         System.Collections.Generic.IList <NavigateInfo> allNavigate = VshopBrowser.GetAllNavigate(ClientType.AliOH);
         foreach (NavigateInfo current in allNavigate)
         {
             if (!current.ImageUrl.ToLower().Contains("storage/master/navigate") && !current.ImageUrl.ToLower().Contains("templates"))
             {
                 current.ImageUrl = HiContext.Current.GetAliOHshopSkinPath(null) + "/images/deskicon/" + current.ImageUrl;
             }
         }
         this.rptNavigate.DataSource = allNavigate;
         this.rptNavigate.DataBind();
     }
     if (this.img != null)
     {
         this.img.Src = new AliohTemplateHelper().GetDefaultBg();
     }
 }
示例#9
0
        protected override void AttachChildControls()
        {
            this.txtTotalPages   = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("txtTotal");
            this.rptSubReferrals = (AliOHTemplatedRepeater)this.FindControl("rptSubReferrals");
            PageTitle.AddSiteNameTitle("下级推广员");
            Users.GetUser(HiContext.Current.User.UserId, false);
            int arg_5B_0 = HiContext.Current.User.UserId;

            this.BindSubReferrals();
        }
示例#10
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    = (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("分类搜索页");
 }
示例#11
0
        protected override void AttachChildControls()
        {
            string url = this.Page.Request.QueryString["returnUrl"];

            if (!string.IsNullOrWhiteSpace(this.Page.Request.QueryString["returnUrl"]))
            {
                this.Page.Response.Redirect(url);
            }
            this.rptProducts            = (AliOHTemplatedRepeater)this.FindControl("rptProducts");
            this.rptProducts.DataSource = ProductBrowser.GetFavorites();
            this.rptProducts.DataBind();
            PageTitle.AddSiteNameTitle("我的收藏");
        }
示例#12
0
        protected override void AttachChildControls()
        {
            this.txtTotalPages    = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("txtTotal");
            this.litSplittinDraws = (FormatedMoneyLabel)this.FindControl("litSplittinDraws");
            this.litAllSplittin   = (FormatedMoneyLabel)this.FindControl("litAllSplittin");
            this.rptSplittin      = (AliOHTemplatedRepeater)this.FindControl("rptSplittin");
            PageTitle.AddSiteNameTitle("佣金明细");
            Users.GetUser(HiContext.Current.User.UserId, false);
            int userId = HiContext.Current.User.UserId;

            this.litAllSplittin.Money   = MemberProcessor.GetUserAllSplittin(userId);
            this.litSplittinDraws.Money = MemberProcessor.GetUserUseSplittin(userId);
            this.BindSplittins();
        }
示例#13
0
        protected override void AttachChildControls()
        {
            this.rptCartProducts = (AliOHTemplatedRepeater)this.FindControl("rptCartProducts");
            this.litTotal        = (System.Web.UI.WebControls.Literal) this.FindControl("litTotal");
            ShoppingCartInfo shoppingCart = ShoppingCartProcessor.GetShoppingCart();

            if (shoppingCart != null)
            {
                this.rptCartProducts.DataSource = shoppingCart.LineItems;
                this.rptCartProducts.DataBind();
                this.litTotal.Text = shoppingCart.GetAmount().ToString("F2");
            }
            PageTitle.AddSiteNameTitle("购物车");
        }
示例#14
0
        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("分类搜索页");
        }
示例#15
0
        protected override void AttachChildControls()
        {
            if (!int.TryParse(this.Page.Request.QueryString["productId"], out this.productId))
            {
                base.GotoResourceNotFound("");
            }
            ProductConsultationAndReplyQuery productConsultationAndReplyQuery = new ProductConsultationAndReplyQuery();
            int pageIndex;

            if (!int.TryParse(this.Page.Request.QueryString["page"], out pageIndex))
            {
                pageIndex = 1;
            }
            int pageSize;

            if (!int.TryParse(this.Page.Request.QueryString["size"], out pageSize))
            {
                pageSize = 20;
            }
            productConsultationAndReplyQuery.ProductId  = this.productId;
            productConsultationAndReplyQuery.IsCount    = true;
            productConsultationAndReplyQuery.PageIndex  = pageIndex;
            productConsultationAndReplyQuery.PageSize   = pageSize;
            productConsultationAndReplyQuery.SortBy     = "ConsultationId";
            productConsultationAndReplyQuery.SortOrder  = SortAction.Desc;
            productConsultationAndReplyQuery.HasReplied = new bool?(true);
            this.rptProducts = (AliOHTemplatedRepeater)this.FindControl("rptProducts");
            this.txtTotal    = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("txtTotal");
            DbQueryResult productConsultations = ProductBrowser.GetProductConsultations(productConsultationAndReplyQuery);

            this.rptProducts.DataSource = productConsultations.Data;
            this.rptProducts.DataBind();
            this.txtTotal.SetWhenIsNotNull(productConsultations.TotalRecords.ToString());
            this.litProductTitle     = (System.Web.UI.WebControls.Literal) this.FindControl("litProductTitle");
            this.litShortDescription = (System.Web.UI.WebControls.Literal) this.FindControl("litShortDescription");
            this.litSoldCount        = (System.Web.UI.WebControls.Literal) this.FindControl("litSoldCount");
            this.litSalePrice        = (System.Web.UI.WebControls.Literal) this.FindControl("litSalePrice");
            this.imgProductImage     = (System.Web.UI.HtmlControls.HtmlImage) this.FindControl("imgProductImage");
            ProductInfo productSimpleInfo = ProductBrowser.GetProductSimpleInfo(this.productId);

            this.litProductTitle.SetWhenIsNotNull(productSimpleInfo.ProductName);
            this.litShortDescription.SetWhenIsNotNull(productSimpleInfo.ShortDescription);
            this.litSoldCount.SetWhenIsNotNull(productSimpleInfo.ShowSaleCounts.ToString());
            this.litSalePrice.SetWhenIsNotNull(productSimpleInfo.MinSalePrice.ToString("F2"));
            this.imgProductImage.Src = (string.IsNullOrEmpty(productSimpleInfo.ThumbnailUrl60) ? Globals.FullPath(this.siteSettings.DefaultProductThumbnail4) : productSimpleInfo.ThumbnailUrl60);
            PageTitle.AddSiteNameTitle("商品咨询");
        }
 protected override void AttachChildControls()
 {
     this.rptvShipping    = (AliOHTemplatedRepeater)this.FindControl("rptvShipping");
     this.aLinkToAdd      = (System.Web.UI.HtmlControls.HtmlAnchor) this.FindControl("aLinkToAdd");
     this.aLinkToAdd.HRef = Globals.ApplicationPath + "/Vshop/AddShippingAddress.aspx";
     if (!string.IsNullOrEmpty(this.Page.Request.QueryString["returnUrl"]))
     {
         System.Web.UI.HtmlControls.HtmlAnchor expr_6D = this.aLinkToAdd;
         expr_6D.HRef = expr_6D.HRef + "?returnUrl=" + Globals.UrlEncode(this.Page.Request.QueryString["returnUrl"]);
     }
     System.Collections.Generic.IList <ShippingAddressInfo> shippingAddresses = MemberProcessor.GetShippingAddresses();
     if (shippingAddresses != null)
     {
         this.rptvShipping.DataSource = shippingAddresses;
         this.rptvShipping.DataBind();
     }
     PageTitle.AddSiteNameTitle("收货地址");
 }
示例#17
0
 protected override void AttachChildControls()
 {
     this.rptArticles = (AliOHTemplatedRepeater)this.FindControl("rpt_ArticleCategory");
     int.TryParse(this.Page.Request.QueryString["categoryId"], out this.categoryId);
     if (!this.Page.IsPostBack)
     {
         if (!string.IsNullOrEmpty(this.Page.Request.QueryString["CategoryId"]))
         {
             int.TryParse(this.Page.Request.QueryString["CategoryId"], out this.categoryId);
             ArticleCategoryInfo articleCategory = CommentBrowser.GetArticleCategory(this.categoryId);
             if (articleCategory != null)
             {
                 PageTitle.AddSiteNameTitle(articleCategory.Name);
             }
         }
         else
         {
             PageTitle.AddSiteNameTitle("文章中心");
         }
         this.rptArticles.DataSource = this.GetDataSource();
         this.rptArticles.DataBind();
     }
 }
示例#18
0
        protected override void AttachChildControls()
        {
            PageTitle.AddSiteNameTitle("会员订单");
            int num = 0;

            int.TryParse(System.Web.HttpContext.Current.Request.QueryString.Get("status"), out num);
            OrderQuery orderQuery = new OrderQuery();

            if (num == 1)
            {
                orderQuery.Status = OrderStatus.WaitBuyerPay;
            }
            else
            {
                if (num == 3)
                {
                    orderQuery.Status = OrderStatus.SellerAlreadySent;
                }
            }
            orderQuery.ShowGiftOrder  = false;
            this.rptOrders            = (AliOHTemplatedRepeater)this.FindControl("rptOrders");
            this.rptOrders.DataSource = MemberProcessor.GetUserOrder(HiContext.Current.User.UserId, orderQuery);
            this.rptOrders.DataBind();
        }
示例#19
0
        protected override void AttachChildControls()
        {
            if (!int.TryParse(this.Page.Request.QueryString["productId"], out this.productId))
            {
                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.rptProductImages      = (AliOHTemplatedRepeater)this.FindControl("rptProductImages");
            this.litProdcutName        = (System.Web.UI.WebControls.Literal) this.FindControl("litProdcutName");
            this.litSalePrice          = (System.Web.UI.WebControls.Literal) this.FindControl("litSalePrice");
            this.litMarketPrice        = (System.Web.UI.WebControls.Literal) this.FindControl("litMarketPrice");
            this.litShortDescription   = (System.Web.UI.WebControls.Literal) this.FindControl("litShortDescription");
            this.litDescription        = (System.Web.UI.WebControls.Literal) this.FindControl("litDescription");
            this.litStock              = (System.Web.UI.WebControls.Literal) this.FindControl("litStock");
            this.skuSelector           = (Common_SKUSelector)this.FindControl("skuSelector");
            this.linkDescription       = (System.Web.UI.WebControls.HyperLink) this.FindControl("linkDescription");
            this.expandAttr            = (Common_ExpandAttributes)this.FindControl("ExpandAttributes");
            this.litSoldCount          = (System.Web.UI.WebControls.Literal) this.FindControl("litSoldCount");
            this.litConsultationsCount = (System.Web.UI.WebControls.Literal) this.FindControl("litConsultationsCount");
            this.litReviewsCount       = (System.Web.UI.WebControls.Literal) this.FindControl("litReviewsCount");
            this.litHasCollected       = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("litHasCollected");
            this.hidden_skus           = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("hidden_skus");
            this.lbUserProductRefer    = (UserProductReferLabel)this.FindControl("lbUserProductRefer");
            ProductBrowseInfo productBrowseInfo = ProductBrowser.GetProductBrowseInfo(this.productId, null, null);

            System.Collections.IEnumerable value =
                from item in productBrowseInfo.Product.Skus
                select item.Value;

            this.hidden_skus.Value = JsonConvert.SerializeObject(value);
            if (productBrowseInfo == null)
            {
                base.GotoResourceNotFound("此商品已不存在");
            }
            if (productBrowseInfo.Product.SaleStatus != ProductSaleStatus.OnSale)
            {
                base.GotoResourceNotFound("此商品已下架");
            }
            if (this.lbUserProductRefer != null)
            {
                this.lbUserProductRefer.product = productBrowseInfo.Product;
            }
            if (this.rptProductImages != null)
            {
                string       locationUrl = "javascript:;";
                SlideImage[] source      = new SlideImage[]
                {
                    new SlideImage(productBrowseInfo.Product.ImageUrl1, locationUrl),
                    new SlideImage(productBrowseInfo.Product.ImageUrl2, locationUrl),
                    new SlideImage(productBrowseInfo.Product.ImageUrl3, locationUrl),
                    new SlideImage(productBrowseInfo.Product.ImageUrl4, locationUrl),
                    new SlideImage(productBrowseInfo.Product.ImageUrl5, locationUrl)
                };
                this.rptProductImages.DataSource =
                    from item in source
                    where !string.IsNullOrWhiteSpace(item.ImageUrl)
                    select item;
                this.rptProductImages.DataBind();
            }
            this.litProdcutName.Text = productBrowseInfo.Product.ProductName;
            this.litSalePrice.Text   = productBrowseInfo.Product.MinSalePrice.ToString("F2");
            if (productBrowseInfo.Product.MarketPrice.HasValue)
            {
                this.litMarketPrice.SetWhenIsNotNull(productBrowseInfo.Product.MarketPrice.GetValueOrDefault(0m).ToString("F2"));
            }
            this.litShortDescription.Text = productBrowseInfo.Product.ShortDescription;
            if (this.litDescription != null)
            {
                System.Text.RegularExpressions.Regex regex = new System.Text.RegularExpressions.Regex("<script[^>]*?>.*?</script>", System.Text.RegularExpressions.RegexOptions.IgnoreCase);
                if (!string.IsNullOrWhiteSpace(productBrowseInfo.Product.MobblieDescription))
                {
                    this.litDescription.Text = regex.Replace(productBrowseInfo.Product.MobblieDescription, "");
                }
                else
                {
                    if (!string.IsNullOrWhiteSpace(productBrowseInfo.Product.Description))
                    {
                        this.litDescription.Text = regex.Replace(productBrowseInfo.Product.Description, "");
                    }
                }
            }
            this.litSoldCount.SetWhenIsNotNull(productBrowseInfo.Product.ShowSaleCounts.ToString());
            this.litStock.Text         = productBrowseInfo.Product.Stock.ToString();
            this.skuSelector.ProductId = this.productId;
            if (this.expandAttr != null)
            {
                this.expandAttr.ProductId = this.productId;
            }
            if (this.linkDescription != null)
            {
                this.linkDescription.NavigateUrl = "/AliOH/ProductDescription.aspx?productId=" + this.productId;
            }
            this.litConsultationsCount.SetWhenIsNotNull(productBrowseInfo.ConsultationCount.ToString());
            this.litReviewsCount.SetWhenIsNotNull(productBrowseInfo.ReviewCount.ToString());
            Member member = HiContext.Current.User as Member;
            bool   flag   = false;

            if (member != null)
            {
                flag = ProductBrowser.CheckHasCollect(member.UserId, this.productId);
            }
            this.litHasCollected.SetWhenIsNotNull(flag ? "1" : "0");
            PageTitle.AddSiteNameTitle(productBrowseInfo.Product.ProductName);
        }
示例#20
0
        protected override void AttachChildControls()
        {
            this.litShipTo            = (System.Web.UI.WebControls.Literal) this.FindControl("litShipTo");
            this.litCellPhone         = (System.Web.UI.WebControls.Literal) this.FindControl("litCellPhone");
            this.litAddress           = (System.Web.UI.WebControls.Literal) this.FindControl("litAddress");
            this.rptCartProducts      = (AliOHTemplatedRepeater)this.FindControl("rptCartProducts");
            this.dropCoupon           = (Common_CouponSelect)this.FindControl("dropCoupon");
            this.litOrderTotal        = (System.Web.UI.WebControls.Literal) this.FindControl("litOrderTotal");
            this.groupbuyHiddenBox    = (System.Web.UI.HtmlControls.HtmlInputControl) this.FindControl("groupbuyHiddenBox");
            this.rptAddress           = (AliOHTemplatedRepeater)this.FindControl("rptAddress");
            this.selectShipTo         = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("selectShipTo");
            this.regionId             = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("regionId");
            this.litProductTotalPrice = (System.Web.UI.WebControls.Literal) this.FindControl("litProductTotalPrice");
            this.rptPromotions        = (AliOHTemplatedRepeater)this.FindControl("rptPromotions");
            System.Collections.Generic.IList <ShippingAddressInfo> shippingAddresses = MemberProcessor.GetShippingAddresses();
            this.rptAddress.DataSource =
                from item in shippingAddresses
                orderby item.IsDefault
                select item;

            this.rptAddress.DataBind();
            ShippingAddressInfo shippingAddressInfo = shippingAddresses.FirstOrDefault((ShippingAddressInfo item) => item.IsDefault);

            if (shippingAddressInfo == null)
            {
                shippingAddressInfo = ((shippingAddresses.Count > 0) ? shippingAddresses[0] : null);
            }
            if (shippingAddressInfo != null)
            {
                this.litShipTo.Text    = shippingAddressInfo.ShipTo;
                this.litCellPhone.Text = shippingAddressInfo.CellPhone;
                this.litAddress.Text   = shippingAddressInfo.Address;
                this.selectShipTo.SetWhenIsNotNull(shippingAddressInfo.ShippingId.ToString());
                this.regionId.SetWhenIsNotNull(shippingAddressInfo.RegionId.ToString());
            }
            if (shippingAddresses == null || shippingAddresses.Count == 0)
            {
                this.Page.Response.Redirect(Globals.ApplicationPath + "/AliOH/AddShippingAddress.aspx?returnUrl=" + Globals.UrlEncode(System.Web.HttpContext.Current.Request.Url.ToString()));
                return;
            }
            ShoppingCartInfo shoppingCartInfo;

            if (int.TryParse(this.Page.Request.QueryString["buyAmount"], out this.buyAmount) && !string.IsNullOrEmpty(this.Page.Request.QueryString["productSku"]) && !string.IsNullOrEmpty(this.Page.Request.QueryString["from"]) && (this.Page.Request.QueryString["from"] == "signBuy" || this.Page.Request.QueryString["from"] == "groupBuy"))
            {
                this.productSku = this.Page.Request.QueryString["productSku"];
                if (int.TryParse(this.Page.Request.QueryString["groupbuyId"], out this.groupBuyId))
                {
                    this.groupbuyHiddenBox.SetWhenIsNotNull(this.groupBuyId.ToString());
                    shoppingCartInfo = ShoppingCartProcessor.GetGroupBuyShoppingCart(this.productSku, this.buyAmount, 0);
                }
                else
                {
                    shoppingCartInfo = ShoppingCartProcessor.GetShoppingCart(this.productSku, this.buyAmount, 0);
                }
            }
            else
            {
                shoppingCartInfo = ShoppingCartProcessor.GetShoppingCart();
            }
            if (shoppingCartInfo != null)
            {
                this.rptCartProducts.DataSource = shoppingCartInfo.LineItems;
                this.rptCartProducts.DataBind();
                this.dropCoupon.CartTotal = shoppingCartInfo.GetTotal();
                this.litOrderTotal.Text   = (this.litProductTotalPrice.Text = shoppingCartInfo.GetTotal().ToString("F2"));
                System.Collections.Generic.List <System.Collections.Generic.KeyValuePair <string, string> > list = new System.Collections.Generic.List <System.Collections.Generic.KeyValuePair <string, string> >();
                if (shoppingCartInfo.IsReduced)
                {
                    list.Add(new System.Collections.Generic.KeyValuePair <string, string>(PromotionHelper.GetShortName(PromoteType.Reduced), shoppingCartInfo.ReducedPromotionName + string.Format(" 优惠:{0}", shoppingCartInfo.ReducedPromotionAmount.ToString("F2"))));
                }
                if (shoppingCartInfo.IsFreightFree)
                {
                    list.Add(new System.Collections.Generic.KeyValuePair <string, string>(PromotionHelper.GetShortName(PromoteType.FullAmountSentFreight), string.Format("{0}", shoppingCartInfo.FreightFreePromotionName)));
                }
                if (shoppingCartInfo.IsSendTimesPoint)
                {
                    list.Add(new System.Collections.Generic.KeyValuePair <string, string>(PromotionHelper.GetShortName(PromoteType.FullAmountSentTimesPoint), string.Format("{0}:送{1}倍", shoppingCartInfo.SentTimesPointPromotionName, shoppingCartInfo.TimesPoint.ToString("F2"))));
                }
                if (this.groupBuyId == 0)
                {
                    this.rptPromotions.DataSource = list;
                    this.rptPromotions.DataBind();
                }
            }
            PageTitle.AddSiteNameTitle("订单确认");
        }
示例#21
0
        protected override void AttachChildControls()
        {
            if (!int.TryParse(this.Page.Request.QueryString["productId"], out this.productId))
            {
                base.GotoResourceNotFound("错误的商品信息!");
            }
            SiteSettings masterSettings = SettingsManager.GetMasterSettings(true);

            this.litProdcutName      = (System.Web.UI.WebControls.Literal) this.FindControl("litProdcutName");
            this.litSalePrice        = (System.Web.UI.WebControls.Literal) this.FindControl("litSalePrice");
            this.litShortDescription = (System.Web.UI.WebControls.Literal) this.FindControl("litShortDescription");
            this.litSoldCount        = (System.Web.UI.WebControls.Literal) this.FindControl("litSoldCount");
            this.productImage        = (System.Web.UI.HtmlControls.HtmlImage) this.FindControl("productImage");
            this.productLink         = (System.Web.UI.WebControls.HyperLink) this.FindControl("productLink");
            this.txtTotal            = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("txtTotal");
            ProductInfo productSimpleInfo = ProductBrowser.GetProductSimpleInfo(this.productId);

            if (productSimpleInfo == null)
            {
                base.GotoResourceNotFound("该件商品已经被管理员删除");
            }
            this.litProdcutName.SetWhenIsNotNull(productSimpleInfo.ProductName);
            this.litSalePrice.SetWhenIsNotNull(productSimpleInfo.MinSalePrice.ToString("F2"));
            this.litShortDescription.SetWhenIsNotNull(productSimpleInfo.ShortDescription);
            this.litSoldCount.SetWhenIsNotNull(productSimpleInfo.ShowSaleCounts.ToString());
            if (!string.IsNullOrEmpty(productSimpleInfo.ThumbnailUrl180))
            {
                this.productImage.Src = productSimpleInfo.ThumbnailUrl180;
            }
            else
            {
                this.productImage.Src = masterSettings.DefaultProductThumbnail5;
            }
            this.productLink.NavigateUrl = "ProductDetails.aspx?ProductId=" + productSimpleInfo.ProductId;
            int pageIndex;

            if (!int.TryParse(this.Page.Request.QueryString["page"], out pageIndex))
            {
                pageIndex = 1;
            }
            int pageSize;

            if (!int.TryParse(this.Page.Request.QueryString["size"], out pageSize))
            {
                pageSize = 20;
            }
            ProductReviewQuery productReviewQuery = new ProductReviewQuery();

            productReviewQuery.productId = this.productId;
            productReviewQuery.IsCount   = true;
            productReviewQuery.PageIndex = pageIndex;
            productReviewQuery.PageSize  = pageSize;
            productReviewQuery.SortBy    = "ReviewId";
            productReviewQuery.SortOrder = SortAction.Desc;
            this.rptProducts             = (AliOHTemplatedRepeater)this.FindControl("rptProducts");
            DbQueryResult productReviews = ProductBrowser.GetProductReviews(productReviewQuery);

            this.rptProducts.DataSource = productReviews.Data;
            this.rptProducts.DataBind();
            this.txtTotal.SetWhenIsNotNull(productReviews.TotalRecords.ToString());
            PageTitle.AddSiteNameTitle("商品评价");
        }
        protected override void AttachChildControls()
        {
            this.orderId          = this.Page.Request.QueryString["orderId"];
            this.litShipTo        = (System.Web.UI.WebControls.Literal) this.FindControl("litShipTo");
            this.litPhone         = (System.Web.UI.WebControls.Literal) this.FindControl("litPhone");
            this.litAddress       = (System.Web.UI.WebControls.Literal) this.FindControl("litAddress");
            this.litOrderId       = (System.Web.UI.WebControls.Literal) this.FindControl("litOrderId");
            this.litOrderDate     = (System.Web.UI.WebControls.Literal) this.FindControl("litOrderDate");
            this.litOrderStatus   = (OrderStatusLabel)this.FindControl("litOrderStatus");
            this.rptOrderProducts = (AliOHTemplatedRepeater)this.FindControl("rptOrderProducts");
            this.litTotalPrice    = (System.Web.UI.WebControls.Literal) this.FindControl("litTotalPrice");
            this.litPayTime       = (System.Web.UI.WebControls.Literal) this.FindControl("litPayTime");
            this.orderStatus      = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("orderStatus");
            this.txtOrderId       = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("txtOrderId");
            this.litRemark        = (System.Web.UI.WebControls.Literal) this.FindControl("litRemark");
            this.litShipToDate    = (System.Web.UI.WebControls.Literal) this.FindControl("litShipToDate");
            this.litShippingCost  = (System.Web.UI.WebControls.Literal) this.FindControl("litShippingCost");
            this.litCounponPrice  = (System.Web.UI.WebControls.Literal) this.FindControl("litCounponPrice");
            this.litBuildPrice    = (System.Web.UI.WebControls.Literal) this.FindControl("litBuildPrice");
            this.litDisCountPrice = (System.Web.UI.WebControls.Literal) this.FindControl("litDisCountPrice");
            this.litActualPrice   = (System.Web.UI.WebControls.Literal) this.FindControl("litActualPrice");
            this.rptPromotions    = (AliOHTemplatedRepeater)this.FindControl("rptPromotions");
            this.litTax           = (System.Web.UI.WebControls.Literal) this.FindControl("litTax");
            this.litPayCharge     = (System.Web.UI.WebControls.Literal) this.FindControl("litPayCharge");
            OrderInfo orderInfo = ShoppingProcessor.GetOrderInfo(this.orderId);

            if (orderInfo == null)
            {
                base.GotoResourceNotFound("此订单已不存在");
            }
            this.litShipTo.Text    = orderInfo.ShipTo;
            this.litPhone.Text     = orderInfo.CellPhone;
            this.litAddress.Text   = orderInfo.ShippingRegion + orderInfo.Address;
            this.litOrderId.Text   = this.orderId;
            this.litOrderDate.Text = orderInfo.OrderDate.ToString();
            this.litTotalPrice.SetWhenIsNotNull(orderInfo.GetAmount().ToString("F2"));
            this.litOrderStatus.OrderStatusCode = orderInfo.OrderStatus;
            this.litPayTime.SetWhenIsNotNull((orderInfo.PayDate != System.DateTime.MinValue) ? orderInfo.PayDate.ToString("yyyy-MM-dd HH:mm:ss") : "");
            this.orderStatus.SetWhenIsNotNull(((int)orderInfo.OrderStatus).ToString());
            this.txtOrderId.SetWhenIsNotNull(this.orderId.ToString());
            this.litCounponPrice.SetWhenIsNotNull(orderInfo.CouponValue.ToString("F2"));
            this.litShippingCost.SetWhenIsNotNull(orderInfo.AdjustedFreight.ToString("F2"));
            this.litShipToDate.SetWhenIsNotNull(orderInfo.ShipToDate);
            this.litBuildPrice.SetWhenIsNotNull(orderInfo.GetAmount().ToString("F2"));
            this.litDisCountPrice.SetWhenIsNotNull(orderInfo.AdjustedDiscount.ToString("F2"));
            this.litActualPrice.SetWhenIsNotNull(orderInfo.GetTotal().ToString("F2"));
            this.litRemark.SetWhenIsNotNull(orderInfo.Remark);
            this.litTax.SetWhenIsNotNull(orderInfo.Tax.ToString("F2"));
            this.litPayCharge.SetWhenIsNotNull(orderInfo.PayCharge.ToString("F2"));
            this.rptOrderProducts.DataSource = orderInfo.LineItems.Values;
            this.rptOrderProducts.DataBind();
            System.Collections.Generic.List <System.Collections.Generic.KeyValuePair <string, string> > list = new System.Collections.Generic.List <System.Collections.Generic.KeyValuePair <string, string> >();
            if (orderInfo.IsReduced)
            {
                list.Add(new System.Collections.Generic.KeyValuePair <string, string>(PromotionHelper.GetShortName(PromoteType.Reduced), orderInfo.ReducedPromotionName + string.Format(" 优惠:{0}", orderInfo.ReducedPromotionAmount.ToString("F2"))));
            }
            if (orderInfo.IsFreightFree)
            {
                list.Add(new System.Collections.Generic.KeyValuePair <string, string>(PromotionHelper.GetShortName(PromoteType.FullAmountSentFreight), string.Format("{0}", orderInfo.FreightFreePromotionName)));
            }
            if (orderInfo.IsSendTimesPoint)
            {
                list.Add(new System.Collections.Generic.KeyValuePair <string, string>(PromotionHelper.GetShortName(PromoteType.FullAmountSentTimesPoint), string.Format("{0}:送{1}倍", orderInfo.SentTimesPointPromotionName, orderInfo.TimesPoint.ToString("F2"))));
            }
            this.rptPromotions.DataSource = list;
            this.rptPromotions.DataBind();
            PageTitle.AddSiteNameTitle("订单详情");
        }