Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            MtcReport mtcReport = db.MtcReports.Find(id);

            db.MtcReports.Remove(mtcReport);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 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));
 }
Beispiel #3
0
        // 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));
        }