Exemplo n.º 1
0
        }// END Map(ICreate... ////////////////////////////

        protected virtual IMovementConfirmationLineStateMergePatched MapMergePatch(IMergePatchMovementConfirmationLine c, IMovementConfirmationCommand outerCommand, long version, IMovementConfirmationState outerState)
        {
            c.RequesterId = outerCommand.RequesterId;
            var stateEventId = new MovementConfirmationLineEventId(c.MovementConfirmationDocumentNumber, c.LineNumber, version);
            IMovementConfirmationLineStateMergePatched e = NewMovementConfirmationLineStateMergePatched(stateEventId);
            var s = outerState.MovementConfirmationLines.Get(c.LineNumber);

            e.MovementLineNumber = c.MovementLineNumber;
            e.TargetQuantity     = c.TargetQuantity;
            e.ConfirmedQuantity  = c.ConfirmedQuantity;
            e.DifferenceQuantity = c.DifferenceQuantity;
            e.ScrappedQuantity   = c.ScrappedQuantity;
            e.Description        = c.Description;
            e.Processed          = c.Processed;
            e.Active             = c.Active;
            e.IsPropertyMovementLineNumberRemoved = c.IsPropertyMovementLineNumberRemoved;
            e.IsPropertyTargetQuantityRemoved     = c.IsPropertyTargetQuantityRemoved;
            e.IsPropertyConfirmedQuantityRemoved  = c.IsPropertyConfirmedQuantityRemoved;
            e.IsPropertyDifferenceQuantityRemoved = c.IsPropertyDifferenceQuantityRemoved;
            e.IsPropertyScrappedQuantityRemoved   = c.IsPropertyScrappedQuantityRemoved;
            e.IsPropertyDescriptionRemoved        = c.IsPropertyDescriptionRemoved;
            e.IsPropertyProcessedRemoved          = c.IsPropertyProcessedRemoved;
            e.IsPropertyActiveRemoved             = c.IsPropertyActiveRemoved;

            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>();
            return(e);
        }// END Map(IMergePatch... ////////////////////////////
        private MovementConfirmationLineEventId NewMovementConfirmationLineEventId(string lineNumber)
        {
            var eId = new MovementConfirmationLineEventId();

            eId.MovementConfirmationDocumentNumber = this.MovementConfirmationEventId.DocumentNumber;
            eId.LineNumber = lineNumber;
            eId.MovementConfirmationVersion = this.MovementConfirmationEventId.Version;
            return(eId);
        }
Exemplo n.º 3
0
        }// END Map(IMergePatch... ////////////////////////////

        protected virtual IMovementConfirmationLineStateRemoved MapRemove(IRemoveMovementConfirmationLine c, IMovementConfirmationCommand outerCommand, long version)
        {
            c.RequesterId = outerCommand.RequesterId;
            var stateEventId = new MovementConfirmationLineEventId(c.MovementConfirmationDocumentNumber, c.LineNumber, version);
            IMovementConfirmationLineStateRemoved e = NewMovementConfirmationLineStateRemoved(stateEventId);


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

            return(e);
        }// END Map(IRemove... ////////////////////////////
        public override bool Equals(object obj)
        {
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }

            MovementConfirmationLineEventId other = obj as MovementConfirmationLineEventId;

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

            return(true &&
                   Object.Equals(this.MovementConfirmationDocumentNumber, other.MovementConfirmationDocumentNumber) &&
                   Object.Equals(this.LineNumber, other.LineNumber) &&
                   Object.Equals(this.MovementConfirmationVersion, other.MovementConfirmationVersion)
                   );
        }
Exemplo n.º 5
0
        protected MovementConfirmationLineEventId NewMovementConfirmationLineEventId(string lineNumber)
        {
            var stateEventId = new MovementConfirmationLineEventId(this.MovementConfirmationEventId.DocumentNumber, lineNumber, this.MovementConfirmationEventId.Version);

            return(stateEventId);
        }
Exemplo n.º 6
0
 protected MovementConfirmationLineEventBase(MovementConfirmationLineEventId stateEventId)
 {
     this.MovementConfirmationLineEventId = stateEventId;
 }
Exemplo n.º 7
0
 public MovementConfirmationLineStateRemoved(MovementConfirmationLineEventId stateEventId) : base(stateEventId)
 {
 }
Exemplo n.º 8
0
 public MovementConfirmationLineStateMergePatched(MovementConfirmationLineEventId stateEventId) : base(stateEventId)
 {
 }
Exemplo n.º 9
0
 protected MovementConfirmationLineStateEventBase(MovementConfirmationLineEventId stateEventId) : base(stateEventId)
 {
 }
Exemplo n.º 10
0
 private MovementConfirmationLineStateRemoved NewMovementConfirmationLineStateRemoved(MovementConfirmationLineEventId stateEventId)
 {
     return(new MovementConfirmationLineStateRemoved(stateEventId));
 }