コード例 #1
0
        public void GetAllProvince()
        {
            List <PROVINCE> lst = RegionDal.getAllProvince();

            Response.Write("{\"success\":true,\"data\":" + JsonHelper.ObjectToJson(lst) + "}");
            //return JsonHelper.ObjectToJson(lst);
        }
コード例 #2
0
        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) + "}");
        }
コード例 #3
0
        // 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) + "}");
        }
コード例 #4
0
        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) + "}");
        }
コード例 #5
0
 public RegionBl()
 {
     _regionDal = new RegionDal();
 }