/// <summary>
        /// Formats the order note text
        /// </summary>
        /// <param name="orderNote">Order note</param>
        /// <returns>Formatted text</returns>
        public static string FormatOrderNoteText(this ShipmentNote shipmentNote)
        {
            if (shipmentNote == null)
            {
                throw new ArgumentNullException("orderNote");
            }

            return(FormatText.ConvertText(shipmentNote.Note));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Deletes an shipment note
        /// </summary>
        /// <param name="shipmentNote">The shipment note</param>
        public virtual async Task InsertShipmentNote(ShipmentNote shipmentNote)
        {
            if (shipmentNote == null)
                throw new ArgumentNullException(nameof(shipmentNote));

            await _shipmentNoteRepository.InsertAsync(shipmentNote);

            //event notification
            await _mediator.EntityInserted(shipmentNote);
        }
Exemplo n.º 3
0
        private ShipmentResponse Map(ShipmentNote shipmentNote)
        {
            var response = new ShipmentResponse
            {
                IsDelivered        = shipmentNote.IsDelivered,
                ConfirmationNumber = shipmentNote.ConfirmationNumber
            };

            return(response);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Deletes an order note
        /// </summary>
        /// <param name="shipmentNote">The order note</param>
        public virtual async Task DeleteShipmentNote(ShipmentNote shipmentNote)
        {
            if (shipmentNote == null)
            {
                throw new ArgumentNullException("shipmentNote");
            }

            await _shipmentNoteRepository.DeleteAsync(shipmentNote);

            //event notification
            await _mediator.EntityDeleted(shipmentNote);
        }
        public virtual async Task InsertShipmentNote(Shipment shipment, string downloadId, bool displayToCustomer, string message)
        {
            var shipmentNote = new ShipmentNote {
                DisplayToCustomer = displayToCustomer,
                Note         = message,
                DownloadId   = downloadId,
                ShipmentId   = shipment.Id,
                CreatedOnUtc = DateTime.UtcNow,
            };
            await _shipmentService.InsertShipmentNote(shipmentNote);

            //new shipment note notification
            // TODO
        }
        /// <summary>
        /// Formats the order note text
        /// </summary>
        /// <param name="orderNote">Order note</param>
        /// <returns>Formatted text</returns>
        public static string FormatOrderNoteText(this ShipmentNote shipmentNote)
        {
            if (shipmentNote == null)
            {
                throw new ArgumentNullException("orderNote");
            }

            string text = shipmentNote.Note;

            if (String.IsNullOrEmpty(text))
            {
                return(string.Empty);
            }

            text = HtmlHelper.FormatText(text, false, true, false, false, false, false);

            return(text);
        }
        private void AddShipmentNumberXX63644633873808996()
        {
            var shipmentNote = new ShipmentNote
            {
                ConfirmationNumber = "XX-636446338738089968",
                IsDelivered        = false,
                Created            = DateTime.Now,
                Request            = new ShipmentRequest
                {
                    Name        = "Jan Kowalski",
                    Address     = "Akademicka 16",
                    City        = "Gliwice",
                    PostalCode  = "44-100",
                    CountryCode = "PL",
                    Email       = "*****@*****.**",
                    PhoneNumber = "32 237 13 10"
                }
            };

            shipmentDispatcher.Add(shipmentNote);
        }