Exemple #1
0
        private OrderItemEventId NewOrderItemEventId(string orderItemSeqId)
        {
            var eId = new OrderItemEventId();

            eId.OrderId        = this.OrderEventId.OrderId;
            eId.OrderItemSeqId = orderItemSeqId;
            eId.OrderVersion   = this.OrderEventId.Version;
            return(eId);
        }
Exemple #2
0
        protected virtual IOrderItemStateCreated MapCreate(ICreateOrderItem c, IOrderCommand outerCommand, long version, IOrderState outerState)
        {
            c.RequesterId = outerCommand.RequesterId;
            var stateEventId         = new OrderItemEventId(c.OrderId, c.OrderItemSeqId, version);
            IOrderItemStateCreated e = NewOrderItemStateCreated(stateEventId);
            var s = outerState.OrderItems.Get(c.OrderItemSeqId, true);

            e.ProductId             = c.ProductId;
            e.ExternalProductId     = c.ExternalProductId;
            e.Quantity              = c.Quantity;
            e.CancelQuantity        = c.CancelQuantity;
            e.SelectedAmount        = c.SelectedAmount;
            e.ExternalId            = c.ExternalId;
            e.OrderItemTypeId       = c.OrderItemTypeId;
            e.OrderItemGroupSeqId   = c.OrderItemGroupSeqId;
            e.IsItemGroupPrimary    = c.IsItemGroupPrimary;
            e.FromInventoryItemId   = c.FromInventoryItemId;
            e.IsPromo               = c.IsPromo;
            e.QuoteId               = c.QuoteId;
            e.QuoteItemSeqId        = c.QuoteItemSeqId;
            e.ShoppingListId        = c.ShoppingListId;
            e.ShoppingListItemSeqId = c.ShoppingListItemSeqId;
            e.UnitPrice             = c.UnitPrice;
            e.UnitListPrice         = c.UnitListPrice;
            e.UnitAverageCost       = c.UnitAverageCost;
            e.UnitRecurringPrice    = c.UnitRecurringPrice;
            e.IsModifiedPrice       = c.IsModifiedPrice;
            e.RecurringFreqUomId    = c.RecurringFreqUomId;
            e.ItemDescription       = c.ItemDescription;
            e.Comments              = c.Comments;
            e.CorrespondingPoId     = c.CorrespondingPoId;
            e.StatusId              = c.StatusId;
            e.SyncStatusId          = c.SyncStatusId;
            e.EstimatedShipDate     = c.EstimatedShipDate;
            e.EstimatedDeliveryDate = c.EstimatedDeliveryDate;
            e.AutoCancelDate        = c.AutoCancelDate;
            e.DontCancelSetDate     = c.DontCancelSetDate;
            e.DontCancelSetBy       = c.DontCancelSetBy;
            e.ShipBeforeDate        = c.ShipBeforeDate;
            e.ShipAfterDate         = c.ShipAfterDate;
            e.CancelBackOrderDate   = c.CancelBackOrderDate;
            e.OverrideGlAccountId   = c.OverrideGlAccountId;
            e.Active = c.Active;

            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>();
            return(e);
        }// END Map(ICreate... ////////////////////////////
Exemple #3
0
        public override bool Equals(object obj)
        {
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }

            OrderItemEventId other = obj as OrderItemEventId;

            if (other == null)
            {
                return(false);
            }

            return(true &&
                   Object.Equals(this.OrderId, other.OrderId) &&
                   Object.Equals(this.OrderItemSeqId, other.OrderItemSeqId) &&
                   Object.Equals(this.OrderVersion, other.OrderVersion)
                   );
        }
Exemple #4
0
 protected OrderItemEventBase(OrderItemEventId stateEventId)
 {
     this.OrderItemEventId = stateEventId;
 }
Exemple #5
0
 public OrderItemStateMergePatched(OrderItemEventId stateEventId) : base(stateEventId)
 {
 }
Exemple #6
0
 public OrderItemStateCreated(OrderItemEventId stateEventId) : base(stateEventId)
 {
 }
Exemple #7
0
 protected OrderItemStateEventBase(OrderItemEventId stateEventId) : base(stateEventId)
 {
 }
Exemple #8
0
 private OrderItemStateMergePatched NewOrderItemStateMergePatched(OrderItemEventId stateEventId)
 {
     return(new OrderItemStateMergePatched(stateEventId));
 }
Exemple #9
0
 private OrderItemStateCreated NewOrderItemStateCreated(OrderItemEventId stateEventId)
 {
     return(new OrderItemStateCreated(stateEventId));
 }
Exemple #10
0
        protected OrderItemEventId NewOrderItemEventId(string orderItemSeqId)
        {
            var stateEventId = new OrderItemEventId(this.OrderEventId.OrderId, orderItemSeqId, this.OrderEventId.Version);

            return(stateEventId);
        }