예제 #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();
        }
예제 #2
0
        public static dbentities.PurchaseOrder DtoToEntity(this PurchaseOrdersRequest request)
        {
            dbentities.PurchaseOrder entity = null;

            if (request != null)
            {
                entity = new dbentities.PurchaseOrder
                {
                    PurchaseOrderID = request.PurchaseOrderId,
                    OrderTypeID     = request.PurchaseOrderTypeId,
                    TotalQuantity   = request.TotalQuantity,
                    TotalAmount     = request.TotalAmount,
                    CreatedBy       = request.CreatedBy,
                    CreatedTime     = request.CreatedTime,
                    ModifiedBy      = request.ModifiedBy,
                    ModifiedTime    = request.ModifiedTime
                };
            }

            return(entity);
        }