public ActionResult DeleteConfirmed(int id) { Tbl_Dut tbl_Dut = db.Tbl_Dut.Find(id); db.Tbl_Dut.Remove(tbl_Dut); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "id,renavam,chassi,placa,comVenda,comDUT")] Tbl_Dut tbl_Dut) { if (ModelState.IsValid) { db.Entry(tbl_Dut).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tbl_Dut)); }
public ActionResult Create([Bind(Include = "id,renavam,chassi,placa,comVenda,comDUT")] Tbl_Dut tbl_Dut) { if (ModelState.IsValid) { db.Tbl_Dut.Add(tbl_Dut); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tbl_Dut)); }
// GET: Tbl_Dut/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Tbl_Dut tbl_Dut = db.Tbl_Dut.Find(id); if (tbl_Dut == null) { return(HttpNotFound()); } return(View(tbl_Dut)); }