public void GetAllProvince() { List <PROVINCE> lst = RegionDal.getAllProvince(); Response.Write("{\"success\":true,\"data\":" + JsonHelper.ObjectToJson(lst) + "}"); //return JsonHelper.ObjectToJson(lst); }
public void getVillageByTownId(string townId) { if (string.IsNullOrEmpty(townId)) { Response.Write("{\"success\":false,\"error\":\"参数错误!\"}"); } List <VILLAGE> lst = RegionDal.getVillageByTownId(townId); Response.Write("{\"success\":true,\"data\":" + JsonHelper.ObjectToJson(lst) + "}"); }
// countyId 区县id public void getTownByCountyId(string countyId) { if (string.IsNullOrEmpty(countyId)) { Response.Write("{\"success\":false,\"error\":\"参数错误!\"}"); } List <TOWN> lst = RegionDal.getTownByCountyId(countyId); Response.Write("{\"success\":true,\"data\":" + JsonHelper.ObjectToJson(lst) + "}"); }
public void getCityByProId(string proId) { if (string.IsNullOrEmpty(proId)) { Response.Write("{\"success\":false,\"error\":\"参数错误!\"}"); } List <CITY> lst = RegionDal.getCityByProId(proId); Response.Write("{\"success\":true,\"data\":" + JsonHelper.ObjectToJson(lst) + "}"); }
public RegionBl() { _regionDal = new RegionDal(); }