public ActionResult DeleteConfirmed(int id) { Murid murid = db.Muridd.Find(id); db.Muridd.Remove(murid); db.SaveChanges(); return(RedirectToAction("Index")); }
// // GET: /Student/Delete/5 public ActionResult Delete(int id = 0) { Murid murid = db.Muridd.Find(id); if (murid == null) { return(HttpNotFound()); } return(View(murid)); }
public ActionResult Edit(Murid murid) { if (ModelState.IsValid) { db.Entry(murid).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.KelasID = new SelectList(db.Kelass, "KelasID", "Nama", murid.KelasID); return(View(murid)); }
// // GET: /Student/Edit/5 public ActionResult Edit(int id = 0) { Murid murid = db.Muridd.Find(id); if (murid == null) { return(HttpNotFound()); } ViewBag.KelasID = new SelectList(db.Kelass, "KelasID", "Nama", murid.KelasID); return(View(murid)); }
public ActionResult Create(Murid murid) { if (ModelState.IsValid) { db.Muridd.Add(murid); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.KelasID = new SelectList(db.Kelass, "KelasID", "Nama", murid.KelasID); return(View(murid)); }