internal static IEnumerable <Expression <Func <InventoryShipmentOrder, InventoryShipmentOrderDetailBaseReturn> > > SplitSelectInventoryShipmentOrderDetailBase(IInventoryUnitOfWork inventoryUnitOfWork, DateTime currentDate, InventoryOrderEnum inventoryOrder, ISalesUnitOfWork salesUnitOfWork = null) { if (inventoryUnitOfWork == null) { throw new ArgumentNullException("inventoryUnitOfWork"); } var pickedInventory = PickedInventoryProjectors.SplitSelectDetail(inventoryUnitOfWork, currentDate, salesUnitOfWork); var shipmentInfo = ShipmentInformationProjectors.SelectDetail(inventoryOrder); return(new Projectors <InventoryShipmentOrder, InventoryShipmentOrderDetailBaseReturn> { SelectShipmentOrderBase().Merge(o => new InventoryShipmentOrderDetailBaseReturn { PurchaseOrderNumber = o.PurchaseOrderNumber, DateOrderReceived = o.DateReceived, OrderRequestedBy = o.RequestedBy, OrderTakenBy = o.TakenBy }), { pickedInventory, s => i => new InventoryShipmentOrderDetailBaseReturn { PickedInventory = s.Invoke(i.PickedInventory) } }, i => new InventoryShipmentOrderDetailBaseReturn { Shipment = shipmentInfo.Invoke(i.ShipmentInformation) } }); }
internal static IEnumerable <Expression <Func <IntraWarehouseOrder, IntraWarehouseOrderReturn> > > SplitSelectDetail(IInventoryUnitOfWork inventoryUnitOfWork, DateTime currentDate) { if (inventoryUnitOfWork == null) { throw new ArgumentNullException("inventoryUnitOfWork"); } var pickedInventory = PickedInventoryProjectors.SplitSelectDetail(inventoryUnitOfWork, currentDate); return(new Projectors <IntraWarehouseOrder, IntraWarehouseOrderReturn> { SelectBase().Merge(o => new IntraWarehouseOrderReturn { MovementDate = o.MovementDate }), { pickedInventory, s => o => new IntraWarehouseOrderReturn { PickedInventoryDetail = s.Invoke(o.PickedInventory), } } }); }