コード例 #1
0
 public ActionResult Save(Riwayat_Proyek proyek)
 {
     proyek.created_by = Convert.ToInt64(Session["foo"]);
     if (ProyekRepo.Createproyek(proyek))
     {
         return(Json(new { Simpan = "Berhasil" }, JsonRequestBehavior.AllowGet));
     }
     else
     {
         return(Json(new { Simpan = "Gagal" }, JsonRequestBehavior.AllowGet));
     }
 }
コード例 #2
0
 public ActionResult Delete(int ID, Riwayat_Proyek proyekmdl)
 {
     proyekmdl.deleted_by = Convert.ToInt64(Session["foo"]);
     if (ProyekRepo.Deleteproyek(ID, proyekmdl)) //non static if ( KeahlianRepo.Deletekeahlian(ID))
     {
         return(Json(new { Hapus = "Berhasil" }, JsonRequestBehavior.AllowGet));
     }
     else
     {
         return(Json(new { Hapus = "Gagal" }, JsonRequestBehavior.AllowGet));
     }
 }
コード例 #3
0
 public ActionResult EditSimpan(Riwayat_Proyek proyek)
 {
     proyek.modified_by = Convert.ToInt64(Session["foo"]);
     if (ProyekRepo.Editproyek(proyek))
     {
         return(Json(new { EditSimpan = "Berhasil" }, JsonRequestBehavior.AllowGet)); //return json digunakan untuk memunculkan alert
     }
     else
     {
         return(Json(new { EditSimpan = "Gagal" }, JsonRequestBehavior.AllowGet));
     }
 }
コード例 #4
0
 public ActionResult AmbilData(int ID)
 {
     return(Json(ProyekRepo.GetByID(ID), JsonRequestBehavior.AllowGet));
 }
コード例 #5
0
 public ActionResult Tampil()
 {
     return(Json(ProyekRepo.GetAll(), JsonRequestBehavior.AllowGet));
 }