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