public EditShipment CreateEditShipment(AShipment_ShipmentRequest aShipmentRequest, IList <AShipment_ShippingVendor> aShippingVendors) { var model = new EditShipment() { ShipmentId = null, ShipmentNumber = null, ShipmentStatus = "Open", TrackingNumber = null, ShipmentDate = Locale.GetLocalNow().Date, ShippingVendorId = null, ShippingVendors = GetShippingVendorSelectList(aShippingVendors) }; var shipmentItems = new List <EditShipment.ShipmentItem>(); foreach (var mShipmentRequestItem in aShipmentRequest.MShipmentRequest.ShipmentRequestItems) { var shipmentItem = new EditShipment.ShipmentItem() { ShipmentItemId = null, ShipmentRequestItemId = mShipmentRequestItem.ShipmentRequestItemId, FulfillableItemId = mShipmentRequestItem.FulfillableItemId, FulfillableItemReference = mShipmentRequestItem.FulfillableItemReference, Quantity = mShipmentRequestItem.Quantity }; shipmentItems.Add(shipmentItem); } model.ShipmentItems = shipmentItems; return(model); }
public ShipmentRequest( AShipment_ShipmentRequest aShipmentRequest, IApplicationLocale locale) { AShipmentRequest = aShipmentRequest; Locale = locale; }
public static AShipment_ShipmentRequest AShipment_ShipmentRequest( MFulfillment_ShipmentRequest mShipmentRequest, MFulfillment_ShipmentRequestTransactionSummaryList mTransactions, MFulfillment_ShipmentRequestEventLogSummaryList mEvents, IList <MFulfillment_Fulfillable> mFulfillables, bool allowEdit) { var shipmentRequest = new AShipment_ShipmentRequest() { MShipmentRequest = mShipmentRequest, MTransactions = mTransactions, MEvents = mEvents, MFulfillables = mFulfillables, AllowEdit = allowEdit }; return(shipmentRequest); }
public ShipmentRequest CreateShipmentRequest(AShipment_ShipmentRequest aShipmentRequest) { return(new ShipmentRequest(aShipmentRequest, Locale)); }