public ActionResult Delete(int id) { trka trka = db.trkas.Find(id); db.trkas.Remove(trka); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "idkas,idanggota,nominal,jeniskas,status,creaby,creadate,modiby,modidate")] trka trka) { if (ModelState.IsValid) { db.Entry(trka).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.idanggota = new SelectList(db.msanggotabems, "idanggota", "nama", trka.idanggota); return(View(trka)); }
public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } trka trka = db.trkas.Find(id); if (trka == null) { return(HttpNotFound()); } return(View(trka)); }
public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } trka trka = db.trkas.Find(id); if (trka == null) { return(HttpNotFound()); } ViewBag.idanggota = new SelectList(db.msanggotabems, "idanggota", "nama", trka.idanggota); return(View(trka)); }