Exemplo n.º 1
0
        public void Calculer(IPanierPourPromotions panier, DateTime? date)
        {
            Guid mon_art_guid_offert = new Guid("{56B1EB62-9190-4ED2-95A5-A871C59E4030}");
            bool dejaAjoute = false;
            foreach (var art in panier.Contenu)
            {
                if (art.ArticleGuid.Equals(mon_art_guid_offert))
                    dejaAjoute = true;
            }

            if (dejaAjoute)
                return;

            ElementPanier ma_ligne = panier.Ajouter(mon_art_guid_offert, 1, null) as ElementPanier;
            panier.DefinirPrix(ma_ligne.LigneGuid, 0, 0, 0, 0);
        }
Exemplo n.º 2
0
        public void Calculer(IPanierPourPromotions panier, DateTime?date)
        {
            Guid mon_art_guid_offert = new Guid("{56B1EB62-9190-4ED2-95A5-A871C59E4030}");
            bool dejaAjoute          = false;

            foreach (var art in panier.Contenu)
            {
                if (art.ArticleGuid.Equals(mon_art_guid_offert))
                {
                    dejaAjoute = true;
                }
            }

            if (dejaAjoute)
            {
                return;
            }

            ElementPanier ma_ligne = panier.Ajouter(mon_art_guid_offert, 1, null) as ElementPanier;

            panier.DefinirPrix(ma_ligne.LigneGuid, 0, 0, 0, 0);
        }