Esempio n. 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));
            }
        }
Esempio n. 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"));
            }
        }
Esempio n. 3
0
        public ActionResult Edit(long Nasabah)
        {
            VMNasabah data = RepoNasabah.GetDataByID(Nasabah);

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

            return(View(data));
        }