Exemple #1
0
        public virtual void When(IPhysicalInventoryLineStateRemoved e)
        {
            ThrowOnWrongEvent(e);

            this.Deleted   = true;
            this.UpdatedBy = e.CreatedBy;
            this.UpdatedAt = e.CreatedAt;
        }
        }// END Map(IMergePatch... ////////////////////////////

        protected virtual IPhysicalInventoryLineStateRemoved MapRemove(IRemovePhysicalInventoryLine c, IPhysicalInventoryCommand outerCommand, long version)
        {
            c.RequesterId = outerCommand.RequesterId;
            var stateEventId = new PhysicalInventoryLineEventId(c.PhysicalInventoryDocumentNumber, c.InventoryItemId, version);
            IPhysicalInventoryLineStateRemoved e = NewPhysicalInventoryLineStateRemoved(stateEventId);


            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>();

            return(e);
        }// END Map(IRemove... ////////////////////////////
Exemple #3
0
 void IPhysicalInventoryLineState.When(IPhysicalInventoryLineStateRemoved e)
 {
     throw new NotSupportedException();
 }
        public virtual PhysicalInventoryLineStateRemovedDto ToPhysicalInventoryLineStateRemovedDto(IPhysicalInventoryLineStateRemoved e)
        {
            var dto = new PhysicalInventoryLineStateRemovedDto();

            dto.PhysicalInventoryLineEventId = e.PhysicalInventoryLineEventId;
            dto.CreatedAt = e.CreatedAt;
            dto.CreatedBy = e.CreatedBy;
            dto.Version   = e.Version;
            dto.CommandId = e.CommandId;

            return(dto);
        }
Exemple #5
0
 public void AddPhysicalInventoryLineEvent(IPhysicalInventoryLineStateRemoved e)
 {
     _innerStateEvents.Add((PhysicalInventoryLineStateRemovedDto)e);
 }