public ActionResult DeleteConfirmed(int id) { tblresponsable tblresponsable = db.tblresponsables.Find(id); db.tblresponsables.Remove(tblresponsable); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ResponsableId,Nombres,Telefono,Email,CentroPracticaId")] tblresponsable tblresponsable) { if (ModelState.IsValid) { db.Entry(tblresponsable).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CentroPracticaId = new SelectList(db.tblcentropracticas, "CentroPracticaId", "Nombre", tblresponsable.CentroPracticaId); return(View(tblresponsable)); }
// GET: tblresponsables/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tblresponsable tblresponsable = db.tblresponsables.Find(id); if (tblresponsable == null) { return(HttpNotFound()); } return(View(tblresponsable)); }
// GET: tblresponsables/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tblresponsable tblresponsable = db.tblresponsables.Find(id); if (tblresponsable == null) { return(HttpNotFound()); } ViewBag.CentroPracticaId = new SelectList(db.tblcentropracticas, "CentroPracticaId", "Nombre", tblresponsable.CentroPracticaId); return(View(tblresponsable)); }