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, }); }
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); }