public long SavePurchaseOrder(OrderDto dto) { this.purchaseOrder = dto.DtoToEntityPurchaseOrder(); if (_purchaseOrder.Insert(this.purchaseOrder).IsNull()) { return(0); } return(this.purchaseOrder.PurchaseOrderID); }
public InventoryService(IIOBalanceRepository <Product> product, IIOBalanceRepository <BatchSummary> batchSummary, IIOBalanceRepository <BatchProductLog> batchProductLog) { this._product = product; this._batchSummary = batchSummary; this._batchProductLog = batchProductLog; this.product = new Product(); this.purchaseOrder = new PurchaseOrder(); this.purchaseOrderDetail = new PurchaseOrderDetail(); this.batchSummary = new BatchSummary(); this.batchProductLog = new BatchProductLog(); }
public static IOBalanceEntity.PurchaseOrder DtoToEntityPurchaseOrder(this OrderDto dto) { IOBalanceEntity.PurchaseOrder entity = null; if (!dto.IsNull()) { entity = new IOBalanceEntity.PurchaseOrder { PurchaseOrderID = (long)dto.OrderId, PurchaseOrderNum = dto.OrderNum, BranchID = dto.BranchId, CreatedBy = dto.CreatedBy, DateCreated = dto.DateCreated }; } return(entity); }
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(); }