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