public ActionResult DeleteConfirmed(long id) { MasterHasilReview masterHasilReview = db.HasilReview.Find(id); db.HasilReview.Remove(masterHasilReview); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,Nama,Status")] MasterHasilReview masterHasilReview) { if (ModelState.IsValid) { db.Entry(masterHasilReview).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(masterHasilReview)); }
public ActionResult Create([Bind(Include = "Id,Nama,Status")] MasterHasilReview masterHasilReview) { masterHasilReview.Status = "1"; if (ModelState.IsValid) { db.HasilReview.Add(masterHasilReview); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(masterHasilReview)); }
// GET: MasterHasilReviews/Delete/5 public ActionResult Delete(long?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } MasterHasilReview masterHasilReview = db.HasilReview.Find(id); if (masterHasilReview == null) { return(HttpNotFound()); } return(View(masterHasilReview)); }