Example #1
0
        private void HasActivitiesToJumpUrl()
        {
            string        text          = string.Empty;
            CountDownInfo countDownInfo = PromoteHelper.ActiveCountDownByProductId(this.productId, 0);
            GroupBuyInfo  groupBuyInfo  = PromoteHelper.ActiveGroupBuyByProductId(this.productId);

            if (countDownInfo != null)
            {
                text = "/{0}/CountDownProductsDetails.aspx?countDownId=" + countDownInfo.CountDownId;
            }
            else if (groupBuyInfo != null)
            {
                text = "/{0}/GroupBuyProductDetails.aspx?groupBuyId=" + groupBuyInfo.GroupBuyId;
            }
            else
            {
                ProductPreSaleInfo productPreSaleInfoByProductId = ProductPreSaleHelper.GetProductPreSaleInfoByProductId(this.productId);
                if (productPreSaleInfoByProductId != null)
                {
                    text = "/{0}/PreSaleproductdetails.aspx?PreSaleId=" + productPreSaleInfoByProductId.PreSaleId;
                }
                else
                {
                    int activityStartsImmediatelyAboutCountDown = PromoteHelper.GetActivityStartsImmediatelyAboutCountDown(this.productId);
                    if (activityStartsImmediatelyAboutCountDown > 0)
                    {
                        this.aCountDownUrl.Text        = "该商品即将参与抢购活动,     去看看";
                        this.aCountDownUrl.NavigateUrl = this.FillStringURL("/{0}/CountDownProductsDetails.aspx?countDownId=" + activityStartsImmediatelyAboutCountDown);
                        this.aCountDownUrl.Style.Add("color", "red");
                        this.aCountDownUrl.Visible   = true;
                        this.divCountDownUrl.Visible = true;
                    }
                    else
                    {
                        int activityStartsImmediatelyAboutGroupBuy = PromoteHelper.GetActivityStartsImmediatelyAboutGroupBuy(this.productId);
                        if (activityStartsImmediatelyAboutGroupBuy > 0)
                        {
                            this.aCountDownUrl.Text        = "该商品即将参与团购活动,     去看看";
                            this.aCountDownUrl.NavigateUrl = this.FillStringURL("/{0}//GroupBuyProductDetails.aspx?groupBuyId=" + activityStartsImmediatelyAboutGroupBuy);
                            this.aCountDownUrl.Style.Add("color", "red");
                            this.aCountDownUrl.Visible   = true;
                            this.divCountDownUrl.Visible = true;
                        }
                    }
                }
            }
            if (!string.IsNullOrEmpty(text))
            {
                this.Page.Response.Redirect(this.FillStringURL(text));
            }
        }
        private void HasActivitiesToJumpUrl()
        {
            string        text          = string.Empty;
            CountDownInfo countDownInfo = PromoteHelper.ActiveCountDownByProductId(this.productId, 0);
            GroupBuyInfo  groupBuyInfo  = PromoteHelper.ActiveGroupBuyByProductId(this.productId);

            if (countDownInfo != null)
            {
                text = "/{0}/CountDownProductsDetails.aspx?countDownId=" + countDownInfo.CountDownId;
            }
            else if (groupBuyInfo != null)
            {
                text = "/{0}/GroupBuyProductDetails.aspx?groupBuyId=" + groupBuyInfo.GroupBuyId;
            }
            if (!string.IsNullOrEmpty(text))
            {
                this.Page.Response.Redirect(this.FillStringURL(text));
            }
        }
Example #3
0
        private void HasActivitiesToJumpUrl()
        {
            CountDownInfo countDownInfo = PromoteHelper.ActiveCountDownByProductId(this.productId, this.storeId);

            if (countDownInfo != null && countDownInfo.CountDownId > 0)
            {
                if (countDownInfo.StartDate <= DateTime.Now)
                {
                    this.Page.Response.Redirect("CountDownStoreProductsDetails.aspx?countDownId=" + countDownInfo.CountDownId + "&StoreId=" + this.storeId);
                }
                else
                {
                    this.aCountDownUrl.Text        = "该商品即将参与抢购活动,     去看看";
                    this.aCountDownUrl.NavigateUrl = "CountDownStoreProductsDetails.aspx?countDownId=" + countDownInfo.CountDownId + "&StoreId=" + this.storeId;
                    this.aCountDownUrl.Style.Add("color", "red");
                    this.aCountDownUrl.Visible   = true;
                    this.divCountDownUrl.Visible = true;
                }
            }
        }
Example #4
0
        private void ActivityBusiness()
        {
            CountDownInfo      countDownInfo = PromoteHelper.ActiveCountDownByProductId(this.productId, 0);
            GroupBuyInfo       groupBuyInfo  = PromoteHelper.ActiveGroupBuyByProductId(this.productId);
            ProductPreSaleInfo productPreSaleInfoByProductId = ProductPreSaleHelper.GetProductPreSaleInfoByProductId(this.productId);

            if (countDownInfo != null)
            {
                this.Page.Response.Redirect("/CountDownProductsDetails.aspx?countDownId=" + countDownInfo.CountDownId);
            }
            else if (groupBuyInfo != null)
            {
                this.Page.Response.Redirect("/GroupBuyProductDetails.aspx?groupBuyId=" + groupBuyInfo.GroupBuyId);
            }
            else if (productPreSaleInfoByProductId != null && productPreSaleInfoByProductId.PreSaleEndDate >= DateTime.Now)
            {
                this.Page.Response.Redirect("/PreSaleProductDetails.aspx?PreSaleId=" + productPreSaleInfoByProductId.PreSaleId);
            }
            else
            {
                int activityStartsImmediatelyAboutCountDown = PromoteHelper.GetActivityStartsImmediatelyAboutCountDown(this.productId);
                if (activityStartsImmediatelyAboutCountDown > 0)
                {
                    this.aCountDownUrl.Text        = "该商品即将参与抢购活动,     去看看";
                    this.aCountDownUrl.NavigateUrl = "/CountDownProductsDetails.aspx?countDownId=" + activityStartsImmediatelyAboutCountDown;
                    this.aCountDownUrl.Style.Add("color", "red");
                    this.aCountDownUrl.Visible = true;
                }
                else
                {
                    int activityStartsImmediatelyAboutGroupBuy = PromoteHelper.GetActivityStartsImmediatelyAboutGroupBuy(this.productId);
                    if (activityStartsImmediatelyAboutGroupBuy > 0)
                    {
                        this.aCountDownUrl.Text        = "该商品即将参与团购活动,     去看看";
                        this.aCountDownUrl.NavigateUrl = "/GroupBuyProductDetails.aspx?groupBuyId=" + activityStartsImmediatelyAboutGroupBuy;
                        this.aCountDownUrl.Style.Add("color", "red");
                        this.aCountDownUrl.Visible = true;
                    }
                }
            }
        }