예제 #1
0
        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));
            }
        }
예제 #2
0
        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"));
            }
        }
예제 #3
0
        public ActionResult Edit(long Nasabah)
        {
            VMNasabah data = RepoNasabah.GetDataByID(Nasabah);

            return(View("Edit", data));
        }
예제 #4
0
        // GET: Nasabah
        public ActionResult Index()
        {
            List <VMNasabah> data = RepoNasabah.GetALL();

            return(View(data));
        }