コード例 #1
0
        public ActionResult Delete(long id)
        {
            string result = RepoKreditRumah.HapusData(id);

            if (result == "ok")
            {
                return(RedirectToAction("Index", "KreditRumah"));
            }
            else
            {
                return(Json(new { message = "Gagal", data = result }, JsonRequestBehavior.AllowGet));
            }
        }
コード例 #2
0
        public ActionResult Create(VMKreditRumah data)
        {
            string result = RepoKreditRumah.Create(data);

            if (result == "ok")
            {
                return(Json(new { message = "Berhasil", data = result }, JsonRequestBehavior.AllowGet));
            }
            else
            {
                return(RedirectToAction("Index", "KreditRumah"));
            }
        }
コード例 #3
0
        public ActionResult HitungAngsuran(long id)
        {
            List <VM_Angsuran> result = RepoKreditRumah.HitungAngsuran(id);

            return(View("View", result));
        }
コード例 #4
0
        // GET: KreditRumah
        public ActionResult Index()
        {
            List <VMKreditRumah> data = RepoKreditRumah.GetALL();

            return(View(data));
        }