public ActionResult EditarExameFinal(int id)
        {
            var        exameFinalsDAO = new ExamesFinaisDAO();
            ExameFinal exameFinal     = exameFinalsDAO.BuscaPorId(id);

            return(View(exameFinal));
        }
        public ActionResult Index()
        {
            var alunos          = new AlunosDAO();
            var disciplinas     = new DisciplinasDAO();
            var examesfinaisDAO = new ExamesFinaisDAO();
            var examesfinais    = examesfinaisDAO.ListarExamesFinais();

            foreach (var examefinal in examesfinais)
            {
                examefinal.Aluno = alunos.BuscaPorId(examefinal.AlunoId);
            }

            foreach (var examefinal in examesfinais)
            {
                examefinal.Disciplina = disciplinas.BuscaPorId(examefinal.DisciplinaId);
            }

            return(View(examesfinais));
        }
        public ActionResult VisualizarDetalhes(int id)
        {
            var alunos          = new AlunosDAO();
            var disciplinas     = new DisciplinasDAO();
            var examesfinaisDAO = new ExamesFinaisDAO();
            var examesfinais    = examesfinaisDAO.ListarExamesFinais();

            foreach (var examefinal in examesfinais)
            {
                examefinal.Aluno = alunos.BuscaPorId(examefinal.AlunoId);
            }

            foreach (var examefinal in examesfinais)
            {
                examefinal.Disciplina = disciplinas.BuscaPorId(examefinal.DisciplinaId);
            }

            ExameFinal exameFinal = exameFinalsDAO.BuscaPorId(id);

            return(View(exameFinal));
        }
 public ActionResult EditarExameFinal([Bind(Include = "Id, AlunoId, Nota, DisciplinaId, Data")] ExameFinal exameFinal)
 {
     exameFinalsDAO = new ExamesFinaisDAO();
     exameFinalsDAO.Editar(exameFinal);
     return(RedirectToAction("Index", "ExamesFinais"));
 }