Esempio n. 1
0
        public OrderService(IIOBalanceRepository <PurchaseOrder> purchaseOrder,
                            IIOBalanceRepository <PurchaseOrderDetail> purchaseOrderDetail,
                            IIOBalanceRepository <SalesOrder> salesOrder,
                            IIOBalanceRepository <SalesOrderDetail> salesOrderDetail,
                            IIOBalanceRepository <ReportCombination> reportCombination,
                            IInventoryService inventoryService)
        {
            this._purchaseOrder       = purchaseOrder;
            this._purchaseOrderDetail = purchaseOrderDetail;
            this._salesOrder          = salesOrder;
            this._salesOrderDetail    = salesOrderDetail;
            this._reportCombination   = reportCombination;
            this._inventoryService    = inventoryService;

            this.purchaseOrder       = new IOBalanceEntity.PurchaseOrder();
            this.purchaseOrderDetail = new IOBalanceEntity.PurchaseOrderDetail();
            this.salesOrder          = new IOBalanceEntity.SalesOrder();
            this.salesOrderDetail    = new IOBalanceEntity.SalesOrderDetail();
            this.reportCombination   = new IOBalanceEntity.ReportCombination();
        }
        public static IOBalanceEntity.ReportCombination DtoToEntity(this ReportCombinationDto dto)
        {
            IOBalanceEntity.ReportCombination entity = null;

            if (!dto.IsNull())
            {
                entity = new IOBalanceEntity.ReportCombination
                {
                    TrackingID       = dto.TrackingID,
                    ProductID        = dto.ProductID,
                    DateCreated      = dto.DateCreated,
                    ProductQty       = dto.ProductQty,
                    PurchaseOrderQty = dto.PurchaseOrderQty,
                    SalesOrderQty    = dto.SalesOrderQty,
                    RequestNum       = dto.RequestNum,
                    RequestType      = dto.RequestType,
                    Qty      = dto.Qty,
                    BranchID = dto.BranchId,
                    Remarks  = dto.Remarks
                };
            }

            return(entity);
        }