コード例 #1
0
        public async Task <bool> HandleAsync(GetImportRejectionByMovementId message)
        {
            var rejectMovement = await movementRejectionRepository.GetByMovementIdOrDefault(message.MovementId);

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

            return(true);
        }
コード例 #2
0
        public async Task <RejectedMovementDetails> HandleAsync(GetRejectedImportMovementDetails message)
        {
            var movement = await movementRepository.Get(message.MovementId);

            var details = await rejectionRepository.GetByMovementIdOrDefault(message.MovementId);

            return(new RejectedMovementDetails
            {
                Number = movement.Number,
                Date = details.Date,
                Reason = details.Reason
            });
        }