/// <summary> /// /// </summary> /// <returns></returns> public Aluno GetAluno() { Aluno aluno = new Aluno(); try { if (!isLogado) { throw new NotAuthenticationException("Não autorizado"); } aluno.Aulas = GetAulas(); aluno.Disciplinas = GetHistoricoAluno(); aluno.Perfil = GetPartialAluno().Perfil; return aluno; } catch (Exception e) { throw new UniaraComunicationException("Serviço indisponivel no momento", e.InnerException); } }
/// <summary> /// Recebe um aluno mas apenas com o campo Perfil carregado /// </summary> /// <returns>Aluno parcialmente carregado</returns> public Aluno GetPartialAluno() { Aluno aluno = new Aluno(); try { if (!isLogado) { throw new NotAuthenticationException("Não autorizado"); } PerfilConverter converter = new PerfilConverter(); aluno.Perfil = converter.ConvertTo(httpConn.GetData(AppConstants.INDEX_URL)); return aluno; } catch (Exception e) { throw new UniaraComunicationException("Serviço indisponivel no momento", e.InnerException); } }