Ejemplo n.º 1
0
 public HttpResponseMessage GetCityList([FromUri] string ParentID)
 {
     try
     {
         NativePlaceProvider _Provider = new NativePlaceProvider();
         var result = _Provider.GetCityList(ParentID);
         return(Request.CreateResponse(HttpStatusCode.OK, result));
     }
     catch (Exception ex)
     {
         LogFactory _LogFactory = new LogFactory(this.GetType());
         _LogFactory.CreateLog(LogType.Error, "根据省ID 获取市", "GetCityList", ex);
         return(Request.CreateResponse(HttpStatusCode.InternalServerError, ex.Message));
     }
 }
Ejemplo n.º 2
0
 public HttpResponseMessage GetProvinceList()
 {
     try
     {
         NativePlaceProvider _Provider = new NativePlaceProvider();
         var result = _Provider.GetProvinceList();
         return(Request.CreateResponse(HttpStatusCode.OK, result));
     }
     catch (Exception ex)
     {
         LogFactory _LogFactory = new LogFactory(this.GetType());
         _LogFactory.CreateLog(LogType.Error, "获取省列表", "GetProvinceList", ex);
         return(Request.CreateResponse(HttpStatusCode.InternalServerError, ex.Message));
     }
 }
Ejemplo n.º 3
0
 private static void GetCityList()
 {
     NativePlaceProvider _Provider = new NativePlaceProvider();
     var reult = _Provider.GetCityList("1000");
 }
Ejemplo n.º 4
0
 private static void GetProvinceList()
 {
     NativePlaceProvider _Provider = new NativePlaceProvider();
     var reult = _Provider.GetProvinceList();
 }