public ActionResult EditSimpan(Keahlian keahlian) { keahlian.modified_by = Convert.ToInt64(Session["foo"]); if (KeahlianRepo.Editkeahlian(keahlian)) { return(Json(new { EditSimpan = "Berhasil" }, JsonRequestBehavior.AllowGet)); //return json digunakan untuk memunculkan alert } else { return(Json(new { EditSimpan = "Gagal" }, JsonRequestBehavior.AllowGet)); } }
public ActionResult Delete(int ID, Keahlian keahlianmdl) { keahlianmdl.deleted_by = Convert.ToInt64(Session["foo"]); if (KeahlianRepo.Deletekeahlian(ID, keahlianmdl)) //non static if ( KeahlianRepo.Deletekeahlian(ID)) { return(Json(new { Hapus = "Berhasil" }, JsonRequestBehavior.AllowGet)); } else { return(Json(new { Hapus = "Gagal" }, JsonRequestBehavior.AllowGet)); } }
public ActionResult Save(Keahlian keahlian) { keahlian.created_by = Convert.ToInt64(Session["foo"]); if (KeahlianRepo.Createkeahlian(keahlian)) { return(Json(new { Simpan = "Berhasil" }, JsonRequestBehavior.AllowGet)); } else { return(Json(new { Simpan = "Gagal" }, JsonRequestBehavior.AllowGet)); } }
public ActionResult AmbilData(int ID) { return(Json(KeahlianRepo.GetByID(ID), JsonRequestBehavior.AllowGet)); }
public ActionResult Select() { return(Json(KeahlianRepo.GetSelect(), JsonRequestBehavior.AllowGet)); }
public ActionResult Tampil() { return(Json(KeahlianRepo.GetAll(), JsonRequestBehavior.AllowGet)); }