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