public ActionResult Erase(int id) { IcmsFrete icmsFrete = db.IcmsFretes.Find(id); db.IcmsFretes.Remove(icmsFrete); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,Rotulo,Icms,Frete")] IcmsFrete icmsFrete) { if (ModelState.IsValid) { db.Entry(icmsFrete).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(icmsFrete)); }
public ActionResult Create([Bind(Include = "Id,Rotulo,Icms,Frete")] IcmsFrete icmsFrete) { if (ModelState.IsValid) { db.IcmsFretes.Add(icmsFrete); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(icmsFrete)); }
// GET: IcmsFretes/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } IcmsFrete icmsFrete = db.IcmsFretes.Find(id); if (icmsFrete == null) { return(HttpNotFound()); } return(View(icmsFrete)); }
public ActionResult DeleteConfirmed(int id) { IcmsFrete icmsFrete = db.IcmsFretes.Find(id); return(View("Erase", icmsFrete)); }