public ActionResult DeleteConfirmed(int id) { EtapaFunil etapaFunil = db.EtapaFunilSet.Find(id); db.EtapaFunilSet.Remove(etapaFunil); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,nome,porcentagem,cor")] EtapaFunil etapaFunil) { if (ModelState.IsValid) { db.Entry(etapaFunil).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(etapaFunil)); }
public ActionResult Create([Bind(Include = "Id,nome,porcentagem,cor")] EtapaFunil etapaFunil) { if (ModelState.IsValid) { db.EtapaFunilSet.Add(etapaFunil); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(etapaFunil)); }
// GET: EtapaFunils/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } EtapaFunil etapaFunil = db.EtapaFunilSet.Find(id); if (etapaFunil == null) { return(HttpNotFound()); } return(View(etapaFunil)); }