public ActionResult EditSimpan(Riwayat_Pekerjaan pekerjaan) { pekerjaan.modified_by = Convert.ToInt64(Session["foo"]); if (PekerjaanRepo.Editpekerjaan(pekerjaan)) { return(Json(new { EditSimpan = "Berhasil" }, JsonRequestBehavior.AllowGet)); //return json digunakan untuk memunculkan alert } else { return(Json(new { EditSimpan = "Gagal" }, JsonRequestBehavior.AllowGet)); } }
public ActionResult Save(Riwayat_Pekerjaan pekerjaan) { pekerjaan.created_by = Convert.ToInt64(Session["foo"]); if (PekerjaanRepo.Createpekerjaan(pekerjaan)) { return(Json(new { Simpan = "Berhasil" }, JsonRequestBehavior.AllowGet)); } else { return(Json(new { Simpan = "Gagal" }, JsonRequestBehavior.AllowGet)); } }
public ActionResult Delete(int ID, Riwayat_Pekerjaan pekerjaanmdl) { pekerjaanmdl.deleted_by = Convert.ToInt64(Session["foo"]); if (PekerjaanRepo.Deletepekerjaan(ID, pekerjaanmdl)) //non static if ( KeahlianRepo.Deletekeahlian(ID)) { return(Json(new { Hapus = "Berhasil" }, JsonRequestBehavior.AllowGet)); } else { return(Json(new { Hapus = "Gagal" }, JsonRequestBehavior.AllowGet)); } }
public ActionResult AmbilData(int ID) { return(Json(PekerjaanRepo.GetByID(ID), JsonRequestBehavior.AllowGet)); }
public ActionResult Tampil() { return(Json(PekerjaanRepo.GetAll(), JsonRequestBehavior.AllowGet)); }