Exemplo n.º 1
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... ////////////////////////////
Exemplo n.º 2
0
 void ICreateOrderItemCommands.Remove(ICreateOrderItem c)
 {
     _innerCommands.Remove((CreateOrderItemDto)c);
 }
Exemplo n.º 3
0
 public void Remove(ICreateOrderItem c)
 {
     _innerCommands.Remove(c);
 }
Exemplo n.º 4
0
 void ICreateOrderItemCommands.Add(ICreateOrderItem c)
 {
     _innerCommands.Add((CreateOrderItemDto)c);
 }
Exemplo n.º 5
0
 public void Add(ICreateOrderItem c)
 {
     _innerCommands.Add(c);
 }