コード例 #1
0
        protected virtual IInventoryPostingRuleStateMergePatched Map(IMergePatchInventoryPostingRule c)
        {
            var stateEventId = new InventoryPostingRuleEventId(c.InventoryPostingRuleId, c.Version);
            IInventoryPostingRuleStateMergePatched e = NewInventoryPostingRuleStateMergePatched(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.IsPropertyTriggerInventoryItemIdRemoved = c.IsPropertyTriggerInventoryItemIdRemoved;
            e.IsPropertyOutputInventoryItemIdRemoved  = c.IsPropertyOutputInventoryItemIdRemoved;
            e.IsPropertyTriggerAccountNameRemoved     = c.IsPropertyTriggerAccountNameRemoved;
            e.IsPropertyOutputAccountNameRemoved      = c.IsPropertyOutputAccountNameRemoved;
            e.IsPropertyIsOutputNegatedRemoved        = c.IsPropertyIsOutputNegatedRemoved;
            e.IsPropertyActiveRemoved = c.IsPropertyActiveRemoved;

            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(IMergePatchInventoryPostingRule c)
 {
     Update(c, ar => ar.MergePatch(c));
 }
コード例 #3
0
 void IInventoryPostingRuleApplicationService.When(IMergePatchInventoryPostingRule c)
 {
     this.When((MergePatchInventoryPostingRuleDto)c);
 }
コード例 #4
0
        public virtual void MergePatch(IMergePatchInventoryPostingRule c)
        {
            IInventoryPostingRuleStateMergePatched e = Map(c);

            Apply(e);
        }