public ActionResult Edit([Bind(Include = "idmatricula,nombre,nrc,creditos,idarea")] matricula matricula) { if (ModelState.IsValid) { MatriculaBLL.Update(matricula); return(RedirectToAction("Index")); } ViewBag.idarea = new SelectList(AreaBLL.List(), "idarea", "nombre", matricula.idalumno); return(View(matricula)); }
public ActionResult Edit([Bind(Include = "idmatricula,fecha,costo,estado,tipo,idalumno,idmateria")] Matricula matricula) { if (ModelState.IsValid) { MatriculaBLL.Update(matricula); return(RedirectToAction("Index")); } ViewBag.idalumno = new SelectList(AlumnoBLL.ListToNames(), "idalumno", "nombre", matricula.idalumno); ViewBag.idmateria = new SelectList(MateriaBLL.ListToNames(), "idmateria", "nombre", matricula.idmateria); return(View(matricula)); }
public ActionResult Edit([Bind(Include = "idmatricula,fecha,costo,estado,tipo,idalumno,idmateria")] Matricula matricula) { if (ModelState.IsValid) { matricula = MatriculaBLL.TransforEnumCreate(matricula); MatriculaBLL.Update(matricula); return(RedirectToAction("Index")); } MatriculaBLL.TransforEnum(matricula); ViewBag.tipo = new SelectList(MatriculaBLL.ListEnum("tipo"), matricula.tipo); ViewBag.estado = new SelectList(MatriculaBLL.ListEnum("estado"), matricula.estado); ViewBag.idalumno = new SelectList(AlumnoBLL.List(), "idalumno", "nombres", matricula.idalumno); ViewBag.idmateria = new SelectList(MateriaBLL.List(), "idmateria", "nombre", matricula.idmateria); return(View(matricula)); }