Esempio n. 1
0
    public void AlterarUnidade(UnidadeEnsinoBean unidade)
    {
        //Verifica se unidade está sem nome
        ValidarUnidade(unidade);

        unidadedao = new Unidade_de_EnsinoDao();
        var linhasafetadas = unidadedao.AlterarUnidade(unidade);

        //verifica se retornou nenhuma linha afetada
        if (linhasafetadas == 0)
        {
            throw new UsuarioNaoCadastradoException();
        }
    }