Пример #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.SalesOrderDetail DtoToEntity(this SalesOrderDetailsRequest request)
        {
            dbentities.SalesOrderDetail entity = null;

            if (request != null)
            {
                entity = new dbentities.SalesOrderDetail
                {
                    SalesOrderID     = request.SalesOrderId,
                    ProductID        = request.ProductId,
                    Quantity         = request.Quantity,
                    UnitPrice        = request.UnitPrice,
                    CreatedBy        = request.CreatedBy,
                    CreatedTime      = request.CreatedTime,
                    ModifiedBy       = request.ModifiedBy,
                    ModifiedTime     = request.ModifiedTime,
                    PreviousQuantity = request.PreviousQuantity,
                    Remarks          = request.Remarks,
                    PriceTypeID      = request.PriceTypeId,
                };
            }

            return(entity);
        }