Exemple #1
0
        public virtual OrderShipGroupStateCreatedDto NewOrderShipGroupStateCreated(long?shipGroupSeqId)
        {
            var e   = new OrderShipGroupStateCreatedDto();
            var eId = NewOrderShipGroupEventId(shipGroupSeqId);

            e.OrderShipGroupEventId = eId;
            return(e);
        }
Exemple #2
0
        public virtual OrderShipGroupStateCreatedDto ToOrderShipGroupStateCreatedDto(IOrderShipGroupStateCreated e)
        {
            var dto = new OrderShipGroupStateCreatedDto();

            dto.OrderShipGroupEventId = e.OrderShipGroupEventId;
            dto.CreatedAt             = e.CreatedAt;
            dto.CreatedBy             = e.CreatedBy;
            dto.Version               = e.Version;
            dto.CommandId             = e.CommandId;
            dto.ShipmentMethodTypeId  = e.ShipmentMethodTypeId;
            dto.SupplierPartyId       = e.SupplierPartyId;
            dto.VendorPartyId         = e.VendorPartyId;
            dto.CarrierPartyId        = e.CarrierPartyId;
            dto.CarrierRoleTypeId     = e.CarrierRoleTypeId;
            dto.FacilityId            = e.FacilityId;
            dto.DestinationFacilityId = e.DestinationFacilityId;
            dto.ContactMechId         = e.ContactMechId;
            dto.TelecomContactMechId  = e.TelecomContactMechId;
            dto.TrackingNumber        = e.TrackingNumber;
            dto.ContactPartyId        = e.ContactPartyId;
            dto.VehiclePlateNumber    = e.VehiclePlateNumber;
            dto.ShippingInstructions  = e.ShippingInstructions;
            dto.MaySplit              = e.MaySplit;
            dto.GiftMessage           = e.GiftMessage;
            dto.IsGift                      = e.IsGift;
            dto.ShipAfterDate               = e.ShipAfterDate;
            dto.ShipByDate                  = e.ShipByDate;
            dto.EstimatedShipDate           = e.EstimatedShipDate;
            dto.EstimatedDeliveryDate       = e.EstimatedDeliveryDate;
            dto.PickwaveId                  = e.PickwaveId;
            dto.NumberOfPackages            = e.NumberOfPackages;
            dto.NumberOfContainers          = e.NumberOfContainers;
            dto.NumberOfPakagesPerContainer = e.NumberOfPakagesPerContainer;
            dto.OrderShipGroupStatusId      = e.OrderShipGroupStatusId;
            dto.Active                      = e.Active;
            var orderItemShipGroupAssociationEvents = new List <OrderItemShipGroupAssociationStateCreatedDto>();

            foreach (var ee in e.OrderItemShipGroupAssociationEvents)
            {
                OrderItemShipGroupAssociationStateCreatedDto eeDto = OrderItemShipGroupAssociationStateEventDtoConverter.ToOrderItemShipGroupAssociationStateCreatedDto(ee);
                orderItemShipGroupAssociationEvents.Add(eeDto);
            }
            dto.OrderItemShipGroupAssociationEvents = orderItemShipGroupAssociationEvents.ToArray();

            return(dto);
        }
Exemple #3
0
        public virtual OrderStateCreatedDto ToOrderStateCreatedDto(IOrderStateCreated e)
        {
            var dto = new OrderStateCreatedDto();

            dto.OrderEventId            = e.OrderEventId;
            dto.CreatedAt               = e.CreatedAt;
            dto.CreatedBy               = e.CreatedBy;
            dto.CommandId               = e.CommandId;
            dto.OrderTypeId             = e.OrderTypeId;
            dto.OrderName               = e.OrderName;
            dto.ExternalId              = e.ExternalId;
            dto.SalesChannelEnumId      = e.SalesChannelEnumId;
            dto.OrderDate               = e.OrderDate;
            dto.Priority                = e.Priority;
            dto.EntryDate               = e.EntryDate;
            dto.PickSheetPrintedDate    = e.PickSheetPrintedDate;
            dto.StatusId                = e.StatusId;
            dto.CurrencyUomId           = e.CurrencyUomId;
            dto.SyncStatusId            = e.SyncStatusId;
            dto.BillingAccountId        = e.BillingAccountId;
            dto.OriginFacilityId        = e.OriginFacilityId;
            dto.WebSiteId               = e.WebSiteId;
            dto.ProductStoreId          = e.ProductStoreId;
            dto.TerminalId              = e.TerminalId;
            dto.TransactionId           = e.TransactionId;
            dto.AutoOrderShoppingListId = e.AutoOrderShoppingListId;
            dto.NeedsInventoryIssuance  = e.NeedsInventoryIssuance;
            dto.IsRushOrder             = e.IsRushOrder;
            dto.InternalCode            = e.InternalCode;
            dto.RemainingSubTotal       = e.RemainingSubTotal;
            dto.GrandTotal              = e.GrandTotal;
            dto.InvoicePerShipment      = e.InvoicePerShipment;
            dto.Active = e.Active;
            var orderRoleEvents = new List <OrderRoleStateCreatedDto>();

            foreach (var ee in e.OrderRoleEvents)
            {
                OrderRoleStateCreatedDto eeDto = OrderRoleStateEventDtoConverter.ToOrderRoleStateCreatedDto(ee);
                orderRoleEvents.Add(eeDto);
            }
            dto.OrderRoleEvents = orderRoleEvents.ToArray();

            var orderItemEvents = new List <OrderItemStateCreatedDto>();

            foreach (var ee in e.OrderItemEvents)
            {
                OrderItemStateCreatedDto eeDto = OrderItemStateEventDtoConverter.ToOrderItemStateCreatedDto(ee);
                orderItemEvents.Add(eeDto);
            }
            dto.OrderItemEvents = orderItemEvents.ToArray();

            var orderShipGroupEvents = new List <OrderShipGroupStateCreatedDto>();

            foreach (var ee in e.OrderShipGroupEvents)
            {
                OrderShipGroupStateCreatedDto eeDto = OrderShipGroupStateEventDtoConverter.ToOrderShipGroupStateCreatedDto(ee);
                orderShipGroupEvents.Add(eeDto);
            }
            dto.OrderShipGroupEvents = orderShipGroupEvents.ToArray();

            return(dto);
        }