public ActionResult DeleteConfirmed(string id) { t_fallas t_fallas = db.t_fallas.Find(id); db.t_fallas.Remove(t_fallas); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "falla,descripcion")] t_fallas t_fallas) { if (ModelState.IsValid) { db.Entry(t_fallas).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(t_fallas)); }
public ActionResult Create([Bind(Include = "falla,descripcion")] t_fallas t_fallas) { if (ModelState.IsValid) { t_fallas.falla = t_fallas.falla.ToUpper(); db.t_fallas.Add(t_fallas); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(t_fallas)); }
// GET: t_fallas/Edit/5 public ActionResult Edit(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } t_fallas t_fallas = db.t_fallas.Find(id); if (t_fallas == null) { return(HttpNotFound()); } return(View(t_fallas)); }