public ActionResult DeleteConfirmed(int id) { ProblemKendaraan problemKendaraan = db.ProblemKendaraan.Find(id); db.ProblemKendaraan.Remove(problemKendaraan); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ProblemKendaraanID,Status,JadwalTunda,Problem")] ProblemKendaraan problemKendaraan) { if (ModelState.IsValid) { db.Entry(problemKendaraan).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(problemKendaraan)); }
public ActionResult Create([Bind(Include = "ProblemKendaraanID,Status,JadwalTunda,Problem")] ProblemKendaraan problemKendaraan) { if (ModelState.IsValid) { db.ProblemKendaraan.Add(problemKendaraan); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(problemKendaraan)); }
// GET: ProblemKendaraan/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ProblemKendaraan problemKendaraan = db.ProblemKendaraan.Find(id); if (problemKendaraan == null) { return(HttpNotFound()); } return(View(problemKendaraan)); }