Ejemplo n.º 1
0
        public PrintOrderItem CreatePrintOrderItem(MarketingPrintOrderItemEntity printOrderItemEntity,
                                                   PrintOrderItemTrackingEntity printOrderItemTrackingEntity, MarketingOrderShippingInfoEntity printOrderItemShipping)
        {
            return(new PrintOrderItem(printOrderItemEntity.MarketingPrintOrderItemId)
            {
                PrintOrderItemId = printOrderItemEntity.MarketingPrintOrderItemId,
                SourceCode = RemoveSourceCodeIdFromPrintOrderItemEntity(printOrderItemEntity.Sourcecode),
                Quantity = printOrderItemEntity.Quantity != null ? (long)printOrderItemEntity.Quantity : 0,
                Status = printOrderItemEntity.Status != null ? (ItemStatus)printOrderItemEntity.Status : ItemStatus.Unknown,
                Shipping = new PrintOrderItemShipping
                {
                    ShippedToAddress1 = printOrderItemShipping.Address1,
                    ShippedToAddress2 = printOrderItemShipping.Address2,
                    ShippedToCity = printOrderItemShipping.City,
                    ShippedToState = printOrderItemShipping.State,
                    ShippedToZip = printOrderItemShipping.ZipCode.ToString(),
                    ShipToAttentionOf = printOrderItemShipping.FirstName + " " + printOrderItemShipping.LastName,
                    ShippedPhoneNumber = printOrderItemShipping.PhoneNumber
                },

                TrackingInfo = printOrderItemTrackingEntity != null?_mapper.Map(printOrderItemTrackingEntity) : null
            });
        }
Ejemplo n.º 2
0
        public PrintOrderItemTrackingViewData Create(MarketingPrintOrderItemEntity itemEntity, string assignedByName,
                                                     string assignedForName, string assignedVendor, PrintOrderItemTrackingEntity trackingEntity)
        {
            var printOrderItemTrackingViewData = new PrintOrderItemTrackingViewData();

            printOrderItemTrackingViewData.DraftedDate = itemEntity.DateCreated.ToString("MMM dd yyyy  @ hh:mm tt");
            printOrderItemTrackingViewData.DraftedBy   = assignedByName;
            printOrderItemTrackingViewData.DraftedFor  = assignedForName;

            if (trackingEntity != null)
            {
                printOrderItemTrackingViewData.ShippedBy   = assignedVendor;
                printOrderItemTrackingViewData.Status      = (ItemStatus)itemEntity.Status;
                printOrderItemTrackingViewData.TrackingNo  = trackingEntity.TrackingNumber;
                printOrderItemTrackingViewData.ShippedVia  = trackingEntity.ShippingService;
                printOrderItemTrackingViewData.ShippedDate = trackingEntity.DateCreated.ToString("MMM dd yyyy  @ hh:mm tt");

                if (itemEntity.Status == (long)ItemStatus.Confirmed)
                {
                    printOrderItemTrackingViewData.AcknowledgeBy       = trackingEntity.ConfirmedBy;
                    printOrderItemTrackingViewData.AcknowledgementDate = ((DateTime)trackingEntity.ActualDeliveryDate).ToString("MMM dd yyyy  @ hh:mm tt");
                    printOrderItemTrackingViewData.AcknowledgeVia      = ((ItemConfirmationMode)trackingEntity.ConfirmationMode).ToString();
                }
            }


            return(printOrderItemTrackingViewData);
        }
Ejemplo n.º 3
0
        public PrintOrderItemViewData Create(DateTime eventDate, long eventId, string eventName, long printOrderId,
                                             MarketingPrintOrderItemEntity printOrderItem, PrintOrderItemTrackingEntity printOrderItemTracking,
                                             string vendorName, string marketingMaterialType, string marketingMaterialName, string placedBy,
                                             MarketingOrderShippingInfoEntity printOrderShipping)
        {
            var itemFactory = new PrintOrderItemFactory();

            return(new PrintOrderItemViewData
            {
                EventDate = eventDate,
                EventId = eventId,
                EventName = eventName,
                PrintOrderId = printOrderId,
                MarketingMaterialType = marketingMaterialType,
                MarketingMaterialName = marketingMaterialName,
                PrintOrderItem = itemFactory.CreatePrintOrderItem(printOrderItem, printOrderItemTracking, printOrderShipping),
                PrintVendor = vendorName,
                OrderPlacedBy = placedBy
            });
        }