Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the SuperSimpleWebshop.Domain.OrderLine class
        /// </summary>
        /// <param name="id">NodeId of the pricing</param>
        /// <param name="variants">Pricing variants of the pricing</param>
        /// <param name="itemCount">Amount of items</param>
        public OrderLine(int id, List <int> variants, int itemCount)
        {
            PricingInfo           = new PricingInfo();
            PricingInfo.PricingId = id;

            #region fill retrieve pricing variants
            PricingInfo.PricingVariants = new List <PricingVariantInfo>();

            if (variants != null && variants.Count > 0)
            {
                foreach (var variantId in variants)
                {
                    PricingInfo.PricingVariants.Add(
                        new PricingVariantInfo
                    {
                        PricingVariantId = variantId
                    }
                        );
                }
            }
            #endregion

            ProductId    = PricingInfo.Pricing.Product.Id;
            ProductTitle = PricingInfo.Pricing.Product.Title;

            ItemCount = itemCount;

            PricingInfo.ItemCount = itemCount;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the SuperSimpleWebshop.Domain.OrderLine class
        /// </summary>
        /// <param name="id">NodeId of the pricing</param>
        /// <param name="itemCount">Amount of items</param>
        public OrderLine(int id, int itemCount)
        {
            PricingInfo           = new PricingInfo();
            PricingInfo.PricingId = id;

            ProductId    = PricingInfo.Pricing.Product.Id;
            ProductTitle = PricingInfo.Pricing.Product.Title;

            ItemCount = itemCount;

            PricingInfo.ItemCount = itemCount;
        }
Ejemplo n.º 3
0
 public StaticOrderLine()
 {
     PricingInfo = new PricingInfo();
 }
Ejemplo n.º 4
0
 public StaticOrderLine()
 {
     PricingInfo = new PricingInfo();
 }
Ejemplo n.º 5
0
        /// <summary>
        /// Initializes a new instance of the SuperSimpleWebshop.Domain.OrderLine class
        /// </summary>
        /// <param name="id">NodeId of the pricing</param>
        /// <param name="variants">Pricing variants of the pricing</param>
        /// <param name="itemCount">Amount of items</param>
        public OrderLine(int id, List<int> variants, int itemCount)
        {
            PricingInfo = new PricingInfo();
            PricingInfo.PricingId = id;

            #region fill retrieve pricing variants
            PricingInfo.PricingVariants = new List<PricingVariantInfo>();

            if (variants != null && variants.Count > 0)
            {
                foreach (var variantId in variants)
                {
                    PricingInfo.PricingVariants.Add(
                        new PricingVariantInfo
                        {
                            PricingVariantId = variantId
                        }
                    );
                }
            }
            #endregion

            ProductId = PricingInfo.Pricing.Product.Id;
            ProductTitle = PricingInfo.Pricing.Product.Title;

            ItemCount = itemCount;

            PricingInfo.ItemCount = itemCount;
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Initializes a new instance of the SuperSimpleWebshop.Domain.OrderLine class
        /// </summary>
        /// <param name="id">NodeId of the pricing</param>
        /// <param name="itemCount">Amount of items</param>
        public OrderLine(int id, int itemCount)
        {
            PricingInfo = new PricingInfo();
            PricingInfo.PricingId = id;

            ProductId = PricingInfo.Pricing.Product.Id;
            ProductTitle = PricingInfo.Pricing.Product.Title;

            ItemCount = itemCount;

            PricingInfo.ItemCount = itemCount;
        }