public virtual void When(IPhysicalInventoryLineMvoStateDeleted e)
        {
            ThrowOnWrongEvent(e);

            this.Deleted   = true;
            this.UpdatedBy = e.CreatedBy;
            this.UpdatedAt = e.CreatedAt;
        }
Esempio n. 2
0
        protected virtual IPhysicalInventoryLineMvoStateDeleted Map(IDeletePhysicalInventoryLineMvo c)
        {
            var stateEventId = new PhysicalInventoryLineMvoEventId(c.PhysicalInventoryLineId, c.PhysicalInventoryVersion);
            IPhysicalInventoryLineMvoStateDeleted e = NewPhysicalInventoryLineMvoStateDeleted(stateEventId);

            e.CommandId = c.CommandId;


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


            return(e);
        }
Esempio n. 3
0
        public virtual void Delete(IDeletePhysicalInventoryLineMvo c)
        {
            IPhysicalInventoryLineMvoStateDeleted e = Map(c);

            Apply(e);
        }
        public virtual PhysicalInventoryLineMvoStateDeletedDto ToPhysicalInventoryLineMvoStateDeletedDto(IPhysicalInventoryLineMvoStateDeleted e)
        {
            var dto = new PhysicalInventoryLineMvoStateDeletedDto();

            dto.PhysicalInventoryLineMvoEventId = e.PhysicalInventoryLineMvoEventId;
            dto.CreatedAt = e.CreatedAt;
            dto.CreatedBy = e.CreatedBy;
            dto.CommandId = e.CommandId;

            return(dto);
        }
Esempio n. 5
0
 void IPhysicalInventoryLineMvoState.When(IPhysicalInventoryLineMvoStateDeleted e)
 {
     throw new NotSupportedException();
 }
 public void AddPhysicalInventoryLineMvoEvent(IPhysicalInventoryLineMvoStateDeleted e)
 {
     _innerStateEvents.Add((PhysicalInventoryLineMvoStateDeletedDto)e);
 }