Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public ShipmentRequest(
     AShipment_ShipmentRequest aShipmentRequest,
     IApplicationLocale locale)
 {
     AShipmentRequest = aShipmentRequest;
     Locale           = locale;
 }
Exemplo n.º 3
0
            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);
            }
Exemplo n.º 4
0
 public ShipmentRequest CreateShipmentRequest(AShipment_ShipmentRequest aShipmentRequest)
 {
     return(new ShipmentRequest(aShipmentRequest, Locale));
 }