Beispiel #1
0
        private async Task VerificaSeProfessorPodePersistirTurma(string codigoRf, string turmaId, DateTime data)
        {
            var usuario = await servicoUsuario.ObterUsuarioLogado();

            if (!usuario.EhProfessorCj() && !await servicoUsuario.PodePersistirTurma(codigoRf, turmaId, data))
            {
                throw new NegocioException("Você não pode fazer alterações ou inclusões nesta turma e data.");
            }
        }