Beispiel #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));
            }
        }
        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;
                    }
                }
            }
        }