internal static BL.DomainModel.OrderDetail AdaptOrderDetail(OrderDetail d, BL.DomainModel.Order o) { BL.DomainModel.OrderDetail orderDetail = new BL.DomainModel.OrderDetail() { OrderDetailId = d.OrderDetailId, QuantityInUnits = d.QuantityInUnits, UnitPrice = d.UnitPrice, Version = d.Version.ToUlong(), Order = (o == null) ? AdaptOrder(d.OrderReference) : o, Product = ProductAdapter.AdaptProduct(d.ProductReference) }; return orderDetail; }
internal static BL.DomainModel.SupplierProduct AdaptSupplierProduc(SupplierProduct c, BL.DomainModel.Supplier s) { return(new BL.DomainModel.SupplierProduct() { ConditionId = c.SupplierProductId, AverageLeadTimeInDays = c.AverageLeadTime, LastReceiptCost = c.LastReceiptCode, LastReceiptDate = c.LastReceiptDate, MaxOrderQuantity = c.MaxOrderQty.HasValue ? c.MaxOrderQty.Value : 0, MinOrderQuantity = c.MinOrderQty, StandardPrice = c.StandardPrice, Supplier = s, Product = ProductAdapter.AdaptProduct(c.ProductReference), Version = c.Version.ToUlong(), }); }