public ActionResult GetListOfLocalMunicipalities(string municipalityId) { var localMunicipalityModel = new LocalMunicipalityModel(); var localMunicipalityList = localMunicipalityModel.GetListOfLocalMunicipalities(int.Parse(municipalityId)); var result = (from x in localMunicipalityList select new { id = x.Local_Municipality_Id, name = x.Description }).ToList(); return(Json(result, JsonRequestBehavior.AllowGet)); }
/// <summary> /// Get list of Local municipality /// Filter by Distric id /// </summary> /// <param name="municipalityId"></param> /// <returns></returns> public ActionResult FilterFromMunicipalityAjax(string municipalityId) { //Use to generate VEP Search Reports Session["SearchDistrictId"] = municipalityId; if (String.IsNullOrEmpty(municipalityId)) { municipalityId = "-1"; } var localMunicipalityModel = new LocalMunicipalityModel(); var localMunicipalitiesList = localMunicipalityModel.GetListOfLocalMunicipalities(int.Parse(municipalityId)); var result = (from x in localMunicipalitiesList select new { id = x.Local_Municipality_Id, name = x.Description }).ToList(); return(Json(result, JsonRequestBehavior.AllowGet)); }