public virtual MovementConfirmationStateCreatedDto ToMovementConfirmationStateCreatedDto(IMovementConfirmationStateCreated e)
        {
            var dto = new MovementConfirmationStateCreatedDto();

            dto.MovementConfirmationEventId = e.MovementConfirmationEventId;
            dto.CreatedAt              = e.CreatedAt;
            dto.CreatedBy              = e.CreatedBy;
            dto.CommandId              = e.CommandId;
            dto.DocumentStatusId       = e.DocumentStatusId;
            dto.MovementDocumentNumber = e.MovementDocumentNumber;
            dto.IsApproved             = e.IsApproved;
            dto.ApprovalAmount         = e.ApprovalAmount;
            dto.Processed              = e.Processed;
            dto.Processing             = e.Processing;
            dto.DocumentTypeId         = e.DocumentTypeId;
            dto.Description            = e.Description;
            dto.Active = e.Active;
            var movementConfirmationLineEvents = new List <MovementConfirmationLineStateCreatedDto>();

            foreach (var ee in e.MovementConfirmationLineEvents)
            {
                MovementConfirmationLineStateCreatedDto eeDto = MovementConfirmationLineStateEventDtoConverter.ToMovementConfirmationLineStateCreatedDto(ee);
                movementConfirmationLineEvents.Add(eeDto);
            }
            dto.MovementConfirmationLineEvents = movementConfirmationLineEvents.ToArray();

            return(dto);
        }
        public virtual MovementConfirmationLineStateCreatedDto NewMovementConfirmationLineStateCreated(string lineNumber)
        {
            var e   = new MovementConfirmationLineStateCreatedDto();
            var eId = NewMovementConfirmationLineEventId(lineNumber);

            e.MovementConfirmationLineEventId = eId;
            return(e);
        }
        public virtual MovementConfirmationLineStateCreatedDto ToMovementConfirmationLineStateCreatedDto(IMovementConfirmationLineStateCreated e)
        {
            var dto = new MovementConfirmationLineStateCreatedDto();

            dto.MovementConfirmationLineEventId = e.MovementConfirmationLineEventId;
            dto.CreatedAt          = e.CreatedAt;
            dto.CreatedBy          = e.CreatedBy;
            dto.Version            = e.Version;
            dto.CommandId          = e.CommandId;
            dto.MovementLineNumber = e.MovementLineNumber;
            dto.TargetQuantity     = e.TargetQuantity;
            dto.ConfirmedQuantity  = e.ConfirmedQuantity;
            dto.DifferenceQuantity = e.DifferenceQuantity;
            dto.ScrappedQuantity   = e.ScrappedQuantity;
            dto.Description        = e.Description;
            dto.Processed          = e.Processed;
            dto.Active             = e.Active;
            return(dto);
        }