protected virtual IInventoryPostingRuleStateCreated Map(ICreateInventoryPostingRule c) { var stateEventId = new InventoryPostingRuleEventId(c.InventoryPostingRuleId, c.Version); IInventoryPostingRuleStateCreated e = NewInventoryPostingRuleStateCreated(stateEventId); e.TriggerInventoryItemId = c.TriggerInventoryItemId; e.OutputInventoryItemId = c.OutputInventoryItemId; e.TriggerAccountName = c.TriggerAccountName; e.OutputAccountName = c.OutputAccountName; e.IsOutputNegated = c.IsOutputNegated; e.Active = c.Active; e.CommandId = c.CommandId; e.CreatedBy = (string)c.RequesterId; e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>(); var version = c.Version; return(e); }
public virtual void When(ICreateInventoryPostingRule c) { Update(c, ar => ar.Create(c)); }
void IInventoryPostingRuleApplicationService.When(ICreateInventoryPostingRule c) { this.When((CreateInventoryPostingRuleDto)c); }
public virtual void Create(ICreateInventoryPostingRule c) { IInventoryPostingRuleStateCreated e = Map(c); Apply(e); }