public DTOResponse SelecionarAluno(int id) { DTOAluno aluno = DALAlu.Select(id); DTOResponse resposta = new DTOResponse(); if (aluno != null) { if(aluno.Bloqueado){ resposta.Status = false; resposta.Mensagem = "Aluno Bloqueado!"; if(aluno.DtLiberacao!=""){ resposta.Mensagem += "<br>Data de Liberação: "+aluno.DtLiberacao; } } else { List<object> lista = new List<object>(); lista.Add(aluno); resposta.Status = true; resposta.Objeto = lista; } } else { resposta.Status = false; resposta.Mensagem = "R.A. Inválido ou aluno não cadastrado"; } return resposta; }
public DTOResponse SelecionarAlunos() { var alunos = DALAlu.SelectAll(); DTOResponse resposta = new DTOResponse(); resposta.Status = true; resposta.Objeto = alunos.ToList<object>(); return resposta; }
public DTOResponse SelecionarEmprestimosAbertos() { var emprestimos = DALEmp.SelectOpens(); DTOResponse resposta = new DTOResponse(); resposta.Status = true; resposta.Objeto = emprestimos.ToList<object>(); return resposta; }
public DTOResponse SelecionarEmprestimosAluno(int id) { var emprestimos = DALEmp.SelectByStudent(id); DTOResponse resposta = new DTOResponse(); resposta.Status = true; resposta.Objeto = emprestimos.ToList<object>(); return resposta; }
public DTOResponse SelecionarEmprestimo(int id) { var emprestimo = DALEmp.Select(id); DTOResponse resposta = new DTOResponse(); if (emprestimo != null) { List<object> lista = new List<object>(); lista.Add(emprestimo); resposta.Status = true; resposta.Objeto = lista; } else { resposta.Status = false; resposta.Mensagem = "Empréstimo não encontrado!"; } return resposta; }