public ActionResult GetGouvernoratByRegion(int stateid) { IGouvernoratService bat = new GouvernoratService(); List <Gouvernorat> objcity = new List <Gouvernorat>(); objcity = bat.FindGouverneratByRegion(stateid).ToList(); SelectList obgcity = new SelectList(objcity, "idGouvernorat", "libelle", 0); return(Json(obgcity)); }
public ActionResult GetGouvernoratByPays(string stateid) { IGouvernoratService bat = new GouvernoratService(); List <Gouvernorat> objcity = new List <Gouvernorat>(); objcity = bat.findGouverneratByLibellePays(stateid).ToList(); SelectList obgcity = new SelectList(objcity, "libelle", "libelle", 0); return(Json(obgcity)); }