Ejemplo n.º 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));
     }
 }
Ejemplo n.º 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));
     }
 }
Ejemplo n.º 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));
     }
 }
Ejemplo n.º 4
0
 public ActionResult AmbilData(int ID)
 {
     return(Json(KeluargaRepo.GetByID(ID), JsonRequestBehavior.AllowGet));
 }
Ejemplo n.º 5
0
 public ActionResult SelectEducationalLevel()
 {
     return(Json(KeluargaRepo.GetSelectEducationalLevel(), JsonRequestBehavior.AllowGet));
 }
Ejemplo n.º 6
0
 public ActionResult SelectFamilyRelation()
 {
     return(Json(KeluargaRepo.GetSelectFamilyRelation(), JsonRequestBehavior.AllowGet));
 }
Ejemplo n.º 7
0
 public ActionResult Tampil()
 {
     return(Json(KeluargaRepo.GetAll(), JsonRequestBehavior.AllowGet));
 }