internal static IResult <PickedInventoryParameters> ToParsedParameters(this IPickedInventoryItemParameters item, bool requireOrderItemKey = false) { if (item == null) { throw new ArgumentNullException("item"); } IInventoryPickOrderItemKey orderItemKey = null; if (requireOrderItemKey || item.OrderItemKey != null) { var orderItemKeyResult = KeyParserHelper.ParseResult <IInventoryPickOrderItemKey>(item.OrderItemKey); if (!orderItemKeyResult.Success) { return(orderItemKeyResult.ConvertTo <PickedInventoryParameters>()); } orderItemKey = orderItemKeyResult.ResultingObject; } var inventoryKeyResult = KeyParserHelper.ParseResult <IInventoryKey>(item.InventoryKey); if (!inventoryKeyResult.Success) { return(inventoryKeyResult.ConvertTo <PickedInventoryParameters>()); } return(new SuccessResult <PickedInventoryParameters>(new PickedInventoryParameters(orderItemKey, inventoryKeyResult.ResultingObject, item.Quantity, item.CustomerLotCode, item.CustomerProductCode))); }
internal PickedInventoryParameters(IInventoryPickOrderItemKey orderItemKey, IInventoryKey inventoryKey, int quantity, string customerLotCode, string customerProductCode) : this(inventoryKey, quantity, customerLotCode, customerProductCode) { if (orderItemKey != null) { OrderItemKey = new InventoryPickOrderItemKey(orderItemKey); } }
public ModifySalesOrderPickedInventoryItemParameters(IInventoryPickOrderItemKey orderItemKey, IInventoryKey inventoryKey, int quantity, string customerLotCode, string customerProductCode) : base(inventoryKey, null, quantity, customerLotCode, customerProductCode) { if (orderItemKey != null) { SalesOrderItemKey = new SalesOrderItemKey(orderItemKey); } }
public ModifyPickedInventoryItemParameters(IInventoryKey inventoryKey, ILocationKey currentLocationKey, int quantity, string customerLotCode, string customerProductCode, IInventoryPickOrderItemKey orderItemKey = null) { InventoryKey = inventoryKey.ToInventoryKey(); CurrentLocationKey = currentLocationKey != null?currentLocationKey.ToLocationKey() : inventoryKey.ToLocationKey(); OrderItemKey = orderItemKey == null ? null : orderItemKey.ToInventoryPickOrderItemKey(); NewQuantity = quantity; OriginalQuantity = 0; CustomerLotCode = customerLotCode; CustomerProductCode = customerProductCode; }
public static InventoryPickOrderItemKey ToInventoryPickOrderItemKey(this IInventoryPickOrderItemKey k) { return(new InventoryPickOrderItemKey(k)); }
public SalesOrderItemKey(IInventoryPickOrderItemKey orderItemKey) : base(orderItemKey.InventoryPickOrderKey_DateCreated, orderItemKey.InventoryPickOrderKey_Sequence, orderItemKey.InventoryPickOrderItemKey_Sequence) { }