public ActionResult EditSimpan(Barang barang) { if (BarangRepo.Editbarang(barang)) { return(Json(new { EditSimpan = "Berhasil" }, JsonRequestBehavior.AllowGet)); } else { return(Json(new { EditSimpan = "Gagal" }, JsonRequestBehavior.AllowGet)); } }
public ActionResult EditSimpan(Barang barang) { if (BarangRepo.Editbarang(barang)) { return(Json(new { EditSimpan = "Berhasil" }, JsonRequestBehavior.AllowGet)); //return json digunakan untuk memunculkan alert } else { return(Json(new { EditSimpan = "Gagal" }, JsonRequestBehavior.AllowGet)); } }