public ActionResult DeleteConfirmed(int id) { tbl_reportes tbl_reportes = db.tbl_reportes.Find(id); db.tbl_reportes.Remove(tbl_reportes); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "IdReporte,TipoAnimal,TipoReporte,Telefono,Direccion")] tbl_reportes tbl_reportes) { if (ModelState.IsValid) { db.Entry(tbl_reportes).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.TipoReporte = new SelectList(db.tbl_tipoRep, "IdTipo", "Tipo", tbl_reportes.TipoReporte); return(View(tbl_reportes)); }
// GET: tbl_reportes/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tbl_reportes tbl_reportes = db.tbl_reportes.Find(id); if (tbl_reportes == null) { return(HttpNotFound()); } return(View(tbl_reportes)); }
// GET: tbl_reportes/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } tbl_reportes tbl_reportes = db.tbl_reportes.Find(id); if (tbl_reportes == null) { return(HttpNotFound()); } ViewBag.TipoReporte = new SelectList(db.tbl_tipoRep, "IdTipo", "Tipo", tbl_reportes.TipoReporte); return(View(tbl_reportes)); }