Exemple #1
0
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);
            PanierProvider     prv = ECommerceServer.Panier;
            IncitationAvantage inc = prv.GetIncitation();

            if (inc == null)
            {
                this.Text = "";
            }
            else
            {
                this.Text = inc.Message;
            }
        }
Exemple #2
0
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);
            PanierProvider     prv = ECommerceServer.Panier;
            IncitationAvantage inc = prv.GetIncitation();

            if (inc == null)
            {
                return;
            }
            VueArticlesWebDS.ecommerce_articles_webRow r;
            r = ECommerceServer.DataCache.GetArticle(inc.ArticleResultatGuid);
            if (r == null)
            {
                this.Text = "";
            }
            else
            {
                this.Text = r.arw_libelle;
            }
        }
Exemple #3
0
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);

            PanierProvider     prv = ECommerceServer.Panier;
            IncitationAvantage inc = prv.GetIncitation();

            if (inc == null)
            {
                return;
            }

            VueArticlesWebDS.ecommerce_articles_webRow r;
            r = ECommerceServer.DataCache.GetArticle(inc.ArticleResultatGuid);
            if (r == null)
            {
                return;
            }
            if (!r.Isarw_url_img_imagetteNull())
            {
                string url = r.arw_url_img_imagette;
                ImageUrl = url;
            }
        }
Exemple #4
0
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);
            PanierProvider     prv = ECommerceServer.Panier;
            IncitationAvantage inc = prv.GetIncitation();

            if (inc == null)
            {
                return;
            }
            VueArticlesWebDS.ecommerce_articles_webRow r;
            r = ECommerceServer.DataCache.GetArticle(inc.ArticleResultatGuid);
            if (r == null)
            {
                this.Text = "";
            }
            else
            {
                switch (Field)
                {
                case ProduitField.Reference:
                    this.Text = r.Isart_refNull()?"":r.art_ref;
                    break;

                case ProduitField.Libelle:
                    this.Text = r.arw_libelle;
                    break;

                case ProduitField.PrixUnitaireHt:
                    if (r.arw_pu_ht == 0)
                    {
                        if (!string.IsNullOrEmpty(CssClassSiPromo))
                        {
                            this.CssClass = CssClassSiPromo;
                        }
                        if (!string.IsNullOrEmpty(TextePrixZero))
                        {
                            this.Text = TextePrixZero;
                            break;
                        }
                    }
                    this.Text = string.IsNullOrEmpty(Format) ? r.arw_pu_ht.ToString("###,##0.00") : r.arw_pu_ht.ToString(Format);
                    break;

                case ProduitField.PrixUnitaireTtc:
                    if (r.arw_pu_ttc == 0)
                    {
                        if (!string.IsNullOrEmpty(CssClassSiPromo))
                        {
                            this.CssClass = CssClassSiPromo;
                        }
                        if (!string.IsNullOrEmpty(TextePrixZero))
                        {
                            this.Text = TextePrixZero;
                            break;
                        }
                    }
                    this.Text = string.IsNullOrEmpty(Format) ? r.arw_pu_ttc.ToString("###,##0.00") : r.arw_pu_ttc.ToString(Format);
                    break;

                case ProduitField.Quantite:
                    this.Text = string.IsNullOrEmpty(Format) ? inc.QteArticle.ToString("###,##0") : inc.QteArticle.ToString(Format);
                    break;

                case ProduitField.MontantHt:
                    if (r.arw_pu_ht == 0)
                    {
                        if (!string.IsNullOrEmpty(CssClassSiPromo))
                        {
                            this.CssClass = CssClassSiPromo;
                        }
                        if (!string.IsNullOrEmpty(TextePrixZero))
                        {
                            this.Text = TextePrixZero;
                            break;
                        }
                    }

                    this.Text = string.IsNullOrEmpty(Format) ? (inc.QteArticle * r.arw_pu_ht).ToString("###,##0.00") : (inc.QteArticle * r.arw_pu_ht).ToString(Format);
                    break;

                case ProduitField.MontantTtc:
                    if (r.arw_pu_ttc == 0)
                    {
                        if (!string.IsNullOrEmpty(CssClassSiPromo))
                        {
                            this.CssClass = CssClassSiPromo;
                        }
                        if (!string.IsNullOrEmpty(TextePrixZero))
                        {
                            this.Text = TextePrixZero;
                            break;
                        }
                    }
                    this.Text = string.IsNullOrEmpty(Format) ? (inc.QteArticle * r.arw_pu_ttc).ToString("###,##0.00") : (inc.QteArticle * r.arw_pu_ttc).ToString(Format);
                    break;
                }
            }
        }