コード例 #1
0
 private void ConfirmUpdateMovement(MovementConfirmationCommands.DocumentAction c, IMovementState mov)
 {
     MovementApplicationService.ConfirmUpdateMovement(new MovementCommands.DocumentAction()
     {
         DocumentNumber = mov.DocumentNumber,
         Version        = mov.Version,
         CommandId      = c.CommandId,
         RequesterId    = c.RequesterId,
     });
 }
コード例 #2
0
        private IMovementState AssertMovementDocumentStatusInProgress(string movDocNumber)
        {
            var mov = MovementApplicationService.Get(movDocNumber);

            if (mov == null)
            {
                throw new NullReferenceException(String.Format("Movement document number: {0}", movDocNumber));
            }
            if (mov.DocumentStatusId != DocumentStatusIds.InProgress)
            {
                throw new ApplicationException(String.Format("Error document status: {0}", mov.DocumentStatusId));
            }
            return(mov);
        }