示例#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));
     }
 }
示例#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));
     }
 }
示例#3
0
文件: Program.cs 项目: 396000787/csaa
 private static void GetCityList()
 {
     NativePlaceProvider _Provider = new NativePlaceProvider();
     var reult = _Provider.GetCityList("1000");
 }
示例#4
0
文件: Program.cs 项目: 396000787/csaa
 private static void GetProvinceList()
 {
     NativePlaceProvider _Provider = new NativePlaceProvider();
     var reult = _Provider.GetProvinceList();
 }