Beispiel #1
0
        public OrderLine CreateOrderDetail(Order order, Product product)
        {
            var line = new OrderLine
            {
                ProductID = product.ProductID,
                Quantity = 1,
                UnitPrice = product.UnitPrice.GetValueOrDefault(0)
            };

            order.Lines.Add(line);
            return line;
        }
Beispiel #2
0
        public OrderLine CreateOrderDetail(Order order, Product product, decimal price, short quantity, float discount)
        {
            var line = new OrderLine
            {
                ProductID = product.ProductID,
                Discount = discount,
                Quantity = quantity,
                UnitPrice = price
            };

            order.Lines.Add(line);
            return line;
        }