private InventoryItemEntryEventId NewInventoryItemEntryEventId(long entrySeqId)
        {
            var eId = new InventoryItemEntryEventId();

            eId.InventoryItemId      = this.InventoryItemEventId.InventoryItemId;
            eId.EntrySeqId           = entrySeqId;
            eId.InventoryItemVersion = this.InventoryItemEventId.Version;
            return(eId);
        }
        protected virtual IInventoryItemEntryStateCreated MapCreate(ICreateInventoryItemEntry c, IInventoryItemCommand outerCommand, long version, IInventoryItemState outerState)
        {
            c.RequesterId = outerCommand.RequesterId;
            var stateEventId = new InventoryItemEntryEventId(c.InventoryItemId, c.EntrySeqId, version);
            IInventoryItemEntryStateCreated e = NewInventoryItemEntryStateCreated(stateEventId);
            var s = outerState.Entries.Get(c.EntrySeqId, true);

            e.OnHandQuantity    = c.OnHandQuantity;
            e.InTransitQuantity = c.InTransitQuantity;
            e.ReservedQuantity  = c.ReservedQuantity;
            e.OccupiedQuantity  = c.OccupiedQuantity;
            e.VirtualQuantity   = c.VirtualQuantity;
            e.Source            = c.Source;

            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);
            }

            InventoryItemEntryEventId other = obj as InventoryItemEntryEventId;

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

            return(true &&
                   Object.Equals(this.InventoryItemId, other.InventoryItemId) &&
                   Object.Equals(this.EntrySeqId, other.EntrySeqId) &&
                   Object.Equals(this.InventoryItemVersion, other.InventoryItemVersion)
                   );
        }
 protected InventoryItemEntryStateEventDtoBase(InventoryItemEntryEventId stateEventId)
 {
     this.InventoryItemEntryEventId = stateEventId;
 }
Exemple #5
0
        protected InventoryItemEntryEventId NewInventoryItemEntryEventId(long entrySeqId)
        {
            var stateEventId = new InventoryItemEntryEventId(this.InventoryItemEventId.InventoryItemId, entrySeqId, this.InventoryItemEventId.Version);

            return(stateEventId);
        }
 public InventoryItemEntryStateCreated(InventoryItemEntryEventId stateEventId) : base(stateEventId)
 {
 }
 protected InventoryItemEntryStateEventBase(InventoryItemEntryEventId stateEventId) : base(stateEventId)
 {
 }
 protected InventoryItemEntryEventBase(InventoryItemEntryEventId stateEventId) : this(new InventoryItemEntryState())
 {
     this.InventoryItemEntryEventId = stateEventId;
 }
 private InventoryItemEntryStateCreated NewInventoryItemEntryStateCreated(InventoryItemEntryEventId stateEventId)
 {
     return(new InventoryItemEntryStateCreated(stateEventId));
 }