Exemple #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);
        }
Exemple #2
0
        protected InventoryPostingRuleStateDeleted NewInventoryPostingRuleStateDeleted(long version, string commandId, string requesterId)
        {
            var stateEventId = new InventoryPostingRuleEventId(_state.InventoryPostingRuleId, version);
            var e            = NewInventoryPostingRuleStateDeleted(stateEventId);

            e.CommandId = commandId;

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

            return(e);
        }
Exemple #3
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);
        }
        public override bool Equals(object obj)
        {
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }

            InventoryPostingRuleEventId other = obj as InventoryPostingRuleEventId;

            if (other == null)
            {
                return(false);
            }

            return(true &&
                   Object.Equals(this.InventoryPostingRuleId, other.InventoryPostingRuleId) &&
                   Object.Equals(this.Version, other.Version)
                   );
        }
Exemple #5
0
 protected InventoryPostingRuleStateEventDtoBase(InventoryPostingRuleEventId stateEventId)
 {
     this.InventoryPostingRuleEventId = stateEventId;
 }
Exemple #6
0
 public InventoryPostingRuleStateDeleted(InventoryPostingRuleEventId stateEventId) : base(stateEventId)
 {
 }
Exemple #7
0
 public InventoryPostingRuleStateMergePatched(InventoryPostingRuleEventId stateEventId) : base(stateEventId)
 {
 }
Exemple #8
0
 protected InventoryPostingRuleStateEventBase(InventoryPostingRuleEventId stateEventId) : base(stateEventId)
 {
 }
Exemple #9
0
 private InventoryPostingRuleStateDeleted NewInventoryPostingRuleStateDeleted(InventoryPostingRuleEventId stateEventId)
 {
     return(new InventoryPostingRuleStateDeleted(stateEventId));
 }
Exemple #10
0
 private InventoryPostingRuleStateMergePatched NewInventoryPostingRuleStateMergePatched(InventoryPostingRuleEventId stateEventId)
 {
     return(new InventoryPostingRuleStateMergePatched(stateEventId));
 }