コード例 #1
0
        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);
        }
コード例 #2
0
 public virtual void When(ICreateInventoryPostingRule c)
 {
     Update(c, ar => ar.Create(c));
 }
コード例 #3
0
 void IInventoryPostingRuleApplicationService.When(ICreateInventoryPostingRule c)
 {
     this.When((CreateInventoryPostingRuleDto)c);
 }
コード例 #4
0
        public virtual void Create(ICreateInventoryPostingRule c)
        {
            IInventoryPostingRuleStateCreated e = Map(c);

            Apply(e);
        }