예제 #1
0
        public Order AgregarOrder(Order order)
        {
            //return db.Create(order);
            Order result   = default(Order);
            var   orderDAC = new OrderDAC();

            result = orderDAC.Create(order);
            return(result);
        }
        public Order Add(Order Order)
        {
            var OrderDac = new OrderDAC();

            Order.CreatedBy = CreatedBy;
            Order.CreatedOn = CreatedOn;
            Order.ChangedBy = ChangedBy;
            Order.ChangedOn = ChangedOn;
            return(OrderDac.Create(Order));
        }
예제 #3
0
        /// <summary>
        /// Add method.
        /// </summary>
        /// <param name="order"></param>
        /// <returns></returns>
        public Order Add(Order order)
        {
            var orderDac = new OrderDAC();
            var neworder = new Order();

            neworder = orderDac.Create(order);

            var cartbusi = new CartItemBusiness();
            var lista    = cartbusi.FindByCartId(neworder.OrderNumber);

            var odb = new OrderDetailBusiness();

            foreach (CartItem item in lista)
            {
                var od = new OrderDetail();
                od.OrderId   = neworder.Id;
                od.ProductId = item.ProductId;
                od.Price     = item.Price;
                od.Quantity  = item.Quantity;
                odb.Add(od);
            }
            return(neworder);
        }
예제 #4
0
        /// <summary>
        /// Add method.
        /// </summary>
        /// <param name="order"></param>
        /// <returns></returns>
        public Order Add(Order order)
        {
            var orderDac = new OrderDAC();

            return(orderDac.Create(order));
        }