public ActionResult Edit([Bind(Include = "idmateria,nombre,nrc,creditos,idarea")] Materia materia) { if (ModelState.IsValid) { MateriaBLL.Update(materia); return(RedirectToAction("Index")); } ViewBag.idarea = new SelectList(AreaBLL.List(), "idarea", "nombre", materia.idarea); return(View(materia)); }
public IHttpActionResult Get() { try { List <Area> todos = AreaBLL.List(); return(Content(HttpStatusCode.OK, todos)); } catch (Exception ex) { return(Content(HttpStatusCode.BadRequest, ex)); } }
public ActionResult Create([Bind(Include = "idmatricula,nombre,nrc,creditos,idarea")] matricula matricula) { if (ModelState.IsValid) { MatriculaBLL.Create(matricula); return(RedirectToAction("Index")); } ViewBag.idarea = new SelectList(AreaBLL.List(), "idarea", "nombre", matricula.idalumno); return(View(matricula)); }
// GET: Materias/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Materia materia = MateriaBLL.Get(id); if (materia == null) { return(HttpNotFound()); } ViewBag.idarea = new SelectList(AreaBLL.List(), "idarea", "nombre", materia.idarea); return(View(materia)); }
// GET: Materias/Create public ActionResult Create() { ViewBag.idarea = new SelectList(AreaBLL.List(), "idarea", "nombre", "coordinador"); return(View()); }
// GET: Area public ActionResult Index() { return(View(AreaBLL.List())); }