Exemplo n.º 1
0
        public virtual void When(IInventoryPostingRuleStateDeleted e)
        {
            ThrowOnWrongEvent(e);

            this.Deleted   = true;
            this.UpdatedBy = e.CreatedBy;
            this.UpdatedAt = e.CreatedAt;
        }
Exemplo n.º 2
0
        protected virtual IInventoryPostingRuleStateDeleted Map(IDeleteInventoryPostingRule c)
        {
            var stateEventId = new InventoryPostingRuleEventId(c.InventoryPostingRuleId, c.Version);
            IInventoryPostingRuleStateDeleted e = NewInventoryPostingRuleStateDeleted(stateEventId);

            e.CommandId = c.CommandId;


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


            return(e);
        }
 void IInventoryPostingRuleState.When(IInventoryPostingRuleStateDeleted e)
 {
     throw new NotSupportedException();
 }
        public virtual InventoryPostingRuleStateDeletedDto ToInventoryPostingRuleStateDeletedDto(IInventoryPostingRuleStateDeleted e)
        {
            var dto = new InventoryPostingRuleStateDeletedDto();

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

            return(dto);
        }
Exemplo n.º 5
0
 public void AddInventoryPostingRuleEvent(IInventoryPostingRuleStateDeleted e)
 {
     _innerStateEvents.Add((InventoryPostingRuleStateDeletedDto)e);
 }
Exemplo n.º 6
0
        public virtual void Delete(IDeleteInventoryPostingRule c)
        {
            IInventoryPostingRuleStateDeleted e = Map(c);

            Apply(e);
        }