Пример #1
0
        // GET: Disciplina/Delete/5
        public ActionResult Delete(int id)
        {
            Disciplina disciplina = DisciplinaDAO.BuscarPorId(id);

            if (disciplina == null)
            {
                return(HttpNotFound());
            }
            return(View(disciplina));
        }
Пример #2
0
 public IActionResult Cadastrar(MentorDisciplina mentordisciplina)
 {
     mentordisciplina.Mentor     = _mentorDAO.BuscarPorId(mentordisciplina.MentorId);
     mentordisciplina.Disciplina = _disciplinaDAO.BuscarPorId(mentordisciplina.DisciplinaId);
     //if (ModelState.IsValid)
     //{
     _mentordisciplinaDAO.Cadastrar(mentordisciplina);
     return(RedirectToAction("Index", "MentorDisciplina"));
     //}
     //ViewBag.Mentores = new SelectList(_mentorDAO.Listar(), "Id", "Nome");
     //ViewBag.Disciplinas = new SelectList(_disciplinaDAO.Listar(), "Id", "Nome");
     //return View(mentordisciplina);
 }