Esempio n. 1
0
        public OrderServices(IInventoryAAARepository <dbentities.PurchaseOrder> purchaseOrderServices,
                             IInventoryAAARepository <dbentities.PurchaseOrderDetail> purchaseOrderDetailServices,
                             IInventoryAAARepository <dbentities.SalesOrder> salesOrderServices,
                             IInventoryAAARepository <dbentities.SalesOrderDetail> salesOrderDetailServices,
                             IInventoryAAARepository <dbentities.CorrectionOrder> correctionOrderServices,
                             IInventoryAAARepository <dbentities.CorrectionOrderDetail> correctionOrderDetailServices,
                             IInventoryAAARepository <dbentities.SalesOrderStatusLog> salesOrderStatusLogServices,

                             IProductServices productServices,
                             IOrderTypeServices orderTypeServices,
                             ICustomerServices customerServices)
        {
            this._purchaseOrderServices       = purchaseOrderServices;
            this._purchaseOrderDetailServices = purchaseOrderDetailServices;

            this._correctionOrderServices       = correctionOrderServices;
            this._correctionOrderDetailServices = correctionOrderDetailServices;

            this._salesOrderServices          = salesOrderServices;
            this._salesOrderDetailServices    = salesOrderDetailServices;
            this._salesOrderStatusLogServices = salesOrderStatusLogServices;

            this._productServices   = productServices;
            this._orderTypeServices = orderTypeServices;
            this._customerServices  = customerServices;


            this.purchaseOrder         = new dbentities.PurchaseOrder();
            this.purchaseOrderDetail   = new dbentities.PurchaseOrderDetail();
            this.salesOrder            = new dbentities.SalesOrder();
            this.salesOrderDetail      = new dbentities.SalesOrderDetail();
            this.correctionOrder       = new dbentities.CorrectionOrder();
            this.correctionOrderDetail = new dbentities.CorrectionOrderDetail();
            this.salesOrderStatusLog   = new dbentities.SalesOrderStatusLog();
        }
Esempio n. 2
0
        public static dbentities.CorrectionOrder DtoToEntity(this CorrectionOrdersRequest request)
        {
            dbentities.CorrectionOrder entity = null;

            if (request != null)
            {
                entity = new dbentities.CorrectionOrder
                {
                    CorrectionOrderID = request.CorrectionOrderId,
                    OrderTypeID       = request.CorrectionOrderTypeId,
                    TotalQuantity     = request.TotalQuantity,
                    TotalAmount       = request.TotalAmount,
                    CreatedBy         = request.CreatedBy,
                    CreatedTime       = request.CreatedTime,
                    ModifiedBy        = request.ModifiedBy,
                    ModifiedTime      = request.ModifiedTime
                };
            }

            return(entity);
        }