public ActionResult DeleteConfirmed(int id) { KawruhBasa kawruhbasa = db.KawruhBasas.Find(id); db.KawruhBasas.Remove(kawruhbasa); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "KawruhBasaId,Tembung,PodhoTegese,KosokBalen,KategoriId")] KawruhBasa kawruhbasa) { if (ModelState.IsValid) { db.Entry(kawruhbasa).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.KategoriId = new SelectList(db.Kategoris, "KategoriId", "Jenis", kawruhbasa.KategoriId); return(View(kawruhbasa)); }
// GET: /KawruhBasa/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } KawruhBasa kawruhbasa = db.KawruhBasas.Find(id); if (kawruhbasa == null) { return(HttpNotFound()); } return(View(kawruhbasa)); }
// GET: /KawruhBasa/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } KawruhBasa kawruhbasa = db.KawruhBasas.Find(id); if (kawruhbasa == null) { return(HttpNotFound()); } ViewBag.KategoriId = new SelectList(db.Kategoris, "KategoriId", "Jenis", kawruhbasa.KategoriId); return(View(kawruhbasa)); }