public EditShipment CreateEditShipment(AShipment_Shipment aShipment, IList <AShipment_ShippingVendor> aShippingVendors) { var model = new EditShipment() { ShipmentId = aShipment.MShipment.ShipmentId, ShipmentNumber = aShipment.MShipment.ShipmentNumber, ShipmentStatus = aShipment.MShipment.ShipmentStatus.ToString(), TrackingNumber = aShipment.MShipment.TrackingCode, ShipmentDate = Locale.GetLocalTimeFromUtc(aShipment.MShipment.ShipmentDateTimeUtc), ShippingVendorId = aShipment.MShipment.ShippingVendorId, ShippingVendors = GetShippingVendorSelectList(aShippingVendors) }; var shipmentItems = new List <EditShipment.ShipmentItem>(); foreach (var mShipmentItem in aShipment.MShipment.ShipmentItems) { var shipmentItem = new EditShipment.ShipmentItem() { ShipmentItemId = mShipmentItem.ShipmentItemId, FulfillableItemId = mShipmentItem.FulfillableItemId, FulfillableItemReference = mShipmentItem.FulfillableItemReference, Quantity = mShipmentItem.Quantity }; shipmentItems.Add(shipmentItem); } model.ShipmentItems = shipmentItems; return(model); }
public Shipment( AShipment_Shipment aShipment, IApplicationLocale locale) { AShipment = aShipment; Locale = locale; }
public static AShipment_Shipment AShipment_Shipment( MFulfillment_Shipment mShipment, MFulfillment_ShipmentTransactionSummaryList mTransactions, MFulfillment_ShipmentEventLogSummaryList mEvents, IList <MFulfillment_Fulfillable> mFulfillables, bool allowEdit) { var shipment = new AShipment_Shipment() { MShipment = mShipment, MTransactions = mTransactions, MEvents = mEvents, MFulfillables = mFulfillables, AllowEdit = allowEdit }; return(shipment); }
public Shipment CreateShipment(AShipment_Shipment aShipment) { return(new Shipment(aShipment, Locale)); }