Ejemplo n.º 1
0
        /// <summary>
        /// 获取省列表
        /// </summary>
        /// <param name="countryCode"></param>
        /// <returns></returns>
        public List <Area> GeProvinceByCountryCode(string countryCode = "1001")
        {
            var result = new List <Area>();

            result = ProvinceCityHelper.GetAllProvince();
            //try
            //{
            //    Jinher.AMP.CBC.IBP.Facade.ProvinceFacade facade = new ProvinceFacade();
            //    facade.ContextDTO = AuthorizeHelper.CoinInitAuthorizeInfo();
            //    result = facade.GeProvinceByCountryCode(countryCode);
            //}
            //catch (Exception ex)
            //{
            //    LogHelper.Error("调用CBCBP.GeProvinceByCountryCode异常", ex);
            //}

            return(result ?? new List <Area>());
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 获取多个省份的名称
        /// </summary>
        /// <param name="codes">省份代码列表</param>
        /// <returns></returns>
        public IList <string> GetProvincesNameByCode(IList <string> codes)
        {
            var provinces = ProvinceCityHelper.GetAllProvince();

            return(provinces.Where(predicate => codes.Contains(predicate.Code)).Select(selector => selector.Name).ToList());
        }