public virtual void Initialize(IOrderShipGroupMvoStateCreated stateCreated)
        {
            var aggregateId = stateCreated.OrderShipGroupMvoEventId.OrderShipGroupId;
            var state       = new OrderShipGroupMvoState();

            state.OrderShipGroupId = aggregateId;
            var aggregate = (OrderShipGroupMvoAggregate)GetOrderShipGroupMvoAggregate(state);

            var eventStoreAggregateId = ToEventStoreAggregateId(aggregateId);

            aggregate.Apply(stateCreated);
            Persist(eventStoreAggregateId, aggregate, state);
        }
Exemplo n.º 2
0
        public virtual IOrderShipGroupMvoState ToOrderShipGroupMvoState()
        {
            var state = new OrderShipGroupMvoState(true);

            state.OrderShipGroupId     = this.OrderShipGroupId;
            state.ShipmentMethodTypeId = this.ShipmentMethodTypeId;
            state.SupplierPartyId      = this.SupplierPartyId;
            state.VendorPartyId        = this.VendorPartyId;
            state.CarrierPartyId       = this.CarrierPartyId;
            state.CarrierRoleTypeId    = this.CarrierRoleTypeId;
            state.FacilityId           = this.FacilityId;
            state.ContactMechId        = this.ContactMechId;
            state.TelecomContactMechId = this.TelecomContactMechId;
            state.TrackingNumber       = this.TrackingNumber;
            state.ShippingInstructions = this.ShippingInstructions;
            state.MaySplit             = this.MaySplit;
            state.GiftMessage          = this.GiftMessage;
            state.IsGift                = this.IsGift;
            state.ShipAfterDate         = this.ShipAfterDate;
            state.ShipByDate            = this.ShipByDate;
            state.EstimatedShipDate     = this.EstimatedShipDate;
            state.EstimatedDeliveryDate = this.EstimatedDeliveryDate;
            state.PickwaveId            = this.PickwaveId;
            if (this.Version != null && this.Version.HasValue)
            {
                state.Version = this.Version.Value;
            }
            if (this.Active != null && this.Active.HasValue)
            {
                state.Active = this.Active.Value;
            }
            state.OrderOrderTypeId             = this.OrderOrderTypeId;
            state.OrderOrderName               = this.OrderOrderName;
            state.OrderExternalId              = this.OrderExternalId;
            state.OrderSalesChannelEnumId      = this.OrderSalesChannelEnumId;
            state.OrderOrderDate               = this.OrderOrderDate;
            state.OrderPriority                = this.OrderPriority;
            state.OrderEntryDate               = this.OrderEntryDate;
            state.OrderPickSheetPrintedDate    = this.OrderPickSheetPrintedDate;
            state.OrderStatusId                = this.OrderStatusId;
            state.OrderCurrencyUom             = this.OrderCurrencyUom;
            state.OrderSyncStatusId            = this.OrderSyncStatusId;
            state.OrderBillingAccountId        = this.OrderBillingAccountId;
            state.OrderOriginFacilityId        = this.OrderOriginFacilityId;
            state.OrderWebSiteId               = this.OrderWebSiteId;
            state.OrderProductStoreId          = this.OrderProductStoreId;
            state.OrderTerminalId              = this.OrderTerminalId;
            state.OrderTransactionId           = this.OrderTransactionId;
            state.OrderAutoOrderShoppingListId = this.OrderAutoOrderShoppingListId;
            state.OrderNeedsInventoryIssuance  = this.OrderNeedsInventoryIssuance;
            state.OrderIsRushOrder             = this.OrderIsRushOrder;
            state.OrderInternalCode            = this.OrderInternalCode;
            state.OrderRemainingSubTotal       = this.OrderRemainingSubTotal;
            state.OrderGrandTotal              = this.OrderGrandTotal;
            state.OrderInvoicePerShipment      = this.OrderInvoicePerShipment;
            state.OrderCreatedBy               = this.OrderCreatedBy;
            if (this.OrderCreatedAt != null && this.OrderCreatedAt.HasValue)
            {
                state.OrderCreatedAt = this.OrderCreatedAt.Value;
            }
            state.OrderUpdatedBy = this.OrderUpdatedBy;
            if (this.OrderUpdatedAt != null && this.OrderUpdatedAt.HasValue)
            {
                state.OrderUpdatedAt = this.OrderUpdatedAt.Value;
            }
            if (this.OrderActive != null && this.OrderActive.HasValue)
            {
                state.OrderActive = this.OrderActive.Value;
            }
            if (this.OrderVersion != null && this.OrderVersion.HasValue)
            {
                state.OrderVersion = this.OrderVersion.Value;
            }
            state.CreatedBy = this.CreatedBy;
            if (this.CreatedAt != null && this.CreatedAt.HasValue)
            {
                state.CreatedAt = this.CreatedAt.Value;
            }
            state.UpdatedBy = this.UpdatedBy;
            if (this.UpdatedAt != null && this.UpdatedAt.HasValue)
            {
                state.UpdatedAt = this.UpdatedAt.Value;
            }

            return(state);
        }
Exemplo n.º 3
0
 public static CreateOrderShipGroupMvo ToCreateOrderShipGroupMvo(this OrderShipGroupMvoState state)
 {
     return(state.ToCreateOrderShipGroupMvo <CreateOrderShipGroupMvo>());
 }
Exemplo n.º 4
0
 public static MergePatchOrderShipGroupMvo ToMergePatchOrderShipGroupMvo(this OrderShipGroupMvoState state)
 {
     return(state.ToMergePatchOrderShipGroupMvo <MergePatchOrderShipGroupMvo>());
 }
Exemplo n.º 5
0
 public static DeleteOrderShipGroupMvo ToDeleteOrderShipGroupMvo(this OrderShipGroupMvoState state)
 {
     return(state.ToDeleteOrderShipGroupMvo <DeleteOrderShipGroupMvo>());
 }
Exemplo n.º 6
0
 public static IOrderShipGroupMvoCommand ToCreateOrMergePatchOrderShipGroupMvo(this OrderShipGroupMvoState state)
 {
     return(state.ToCreateOrMergePatchOrderShipGroupMvo <CreateOrderShipGroupMvo, MergePatchOrderShipGroupMvo>());
 }