예제 #1
0
 public ActionResult Delete(int ID, Keluarga keluargamdl)
 {
     keluargamdl.deleted_by = Convert.ToInt64(Session["foo"]);
     if (KeluargaRepo.Deletekeluarga(ID, keluargamdl)) //non static if ( KeluargaRepo.Deletekeluarga(ID))
     {
         return(Json(new { Hapus = "Berhasil" }, JsonRequestBehavior.AllowGet));
     }
     else
     {
         return(Json(new { Hapus = "Gagal" }, JsonRequestBehavior.AllowGet));
     }
 }
예제 #2
0
 public ActionResult EditSimpan(Keluarga keluarga)
 {
     keluarga.modified_by = Convert.ToInt64(Session["foo"]);
     if (KeluargaRepo.Editkeluarga(keluarga))
     {
         return(Json(new { EditSimpan = "Berhasil" }, JsonRequestBehavior.AllowGet)); //return json digunakan untuk memunculkan alert
     }
     else
     {
         return(Json(new { EditSimpan = "Gagal" }, JsonRequestBehavior.AllowGet));
     }
 }
예제 #3
0
 public ActionResult Save(Keluarga keluarga)
 {
     keluarga.created_by = Convert.ToInt64(Session["foo"]);
     if (KeluargaRepo.Createkeluarga(keluarga))
     {
         return(Json(new { Simpan = "Berhasil" }, JsonRequestBehavior.AllowGet));
     }
     else
     {
         return(Json(new { Simpan = "Gagal" }, JsonRequestBehavior.AllowGet));
     }
 }
예제 #4
0
 public ActionResult AmbilData(int ID)
 {
     return(Json(KeluargaRepo.GetByID(ID), JsonRequestBehavior.AllowGet));
 }
예제 #5
0
 public ActionResult SelectEducationalLevel()
 {
     return(Json(KeluargaRepo.GetSelectEducationalLevel(), JsonRequestBehavior.AllowGet));
 }
예제 #6
0
 public ActionResult SelectFamilyRelation()
 {
     return(Json(KeluargaRepo.GetSelectFamilyRelation(), JsonRequestBehavior.AllowGet));
 }
예제 #7
0
 public ActionResult Tampil()
 {
     return(Json(KeluargaRepo.GetAll(), JsonRequestBehavior.AllowGet));
 }