public ActionResult DeleteConfirmed(int id) { MtcReport mtcReport = db.MtcReports.Find(id); db.MtcReports.Remove(mtcReport); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID,DocNumber,ReportDate,Mesin,Unit,Part,Kerusakan,PartsPengganti,Penyimpanan,Stock,Inspection,Repaired")] MtcReport mtcReport) { if (ModelState.IsValid) { db.Entry(mtcReport).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(mtcReport)); }
// GET: MtcReports/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } MtcReport mtcReport = db.MtcReports.Find(id); if (mtcReport == null) { return(HttpNotFound()); } return(View(mtcReport)); }