public ActionResult Delete(long Nasabah) { string result = RepoNasabah.HapusData(Nasabah); if (result == "ok") { return(RedirectToAction("Index", "Nasabah")); } else { return(Json(new { message = "Gagal", data = result }, JsonRequestBehavior.AllowGet)); } }
public ActionResult Create(VMNasabah Nasabah) { string result = RepoNasabah.savedata(Nasabah); if (result == "ok") { return(Json(new { message = "Berhasil", data = result }, JsonRequestBehavior.AllowGet)); //return RedirectToAction("Index", "Nasabah"); } else { return(RedirectToAction("Index", "Nasabah")); } }
public ActionResult Edit(long Nasabah) { VMNasabah data = RepoNasabah.GetDataByID(Nasabah); return(View("Edit", data)); }
// GET: Nasabah public ActionResult Index() { List <VMNasabah> data = RepoNasabah.GetALL(); return(View(data)); }