Esempio n. 1
0
        public Order CreateNewOrder(Order order)
        {
            DAL.Entity.Order ord = new DAL.Entity.Order
            {
                Id         = order.Id,
                ClientId   = order.ClientId,
                PeymentId  = order.PeymentId,
                DeliveryId = order.DeliveryId,
                Comment    = order.Comment
            };
            if (ord != null)
            {
                ord = _dal.CreateNewOrder(ord);
                BLL.Models.Order ord_new = new BLL.Models.Order
                {
                    Id         = ord.Id,
                    ClientId   = ord.ClientId,
                    PeymentId  = ord.PeymentId,
                    DeliveryId = ord.DeliveryId,
                    Comment    = ord.Comment
                };

                return(ord_new);
            }
            else
            {
                return(null);
            }
        }
Esempio n. 2
0
        public Order GetOrderById(int id)
        {
            DAL.Entity.Order order       = _dal.GetOrderById(id);
            BLL.Models.Order orderResult = null;

            orderResult = new BLL.Models.Order
            {
                Id         = order.Id,
                ClientId   = order.ClientId,
                PeymentId  = order.PeymentId,
                DeliveryId = order.DeliveryId,
                Comment    = order.Comment
            };
            return(orderResult);
        }