Beispiel #1
0
        public ActionResult Province()
        {
            //三方登录Key
            YSWL.MALL.BLL.Ms.Regions          regionBll  = new Regions();
            List <YSWL.MALL.Model.Ms.Regions> regionList = regionBll.GetProvinceList();

            return(PartialView("_Province", regionList));
        }
Beispiel #2
0
        /// <summary>
        /// 省列表
        /// </summary>
        /// <returns></returns>
        public ActionResult ProvinceList()
        {
            List <RegionInfo> regionList = Regions.GetProvinceList();

            StringBuilder sb = new StringBuilder();

            sb.Append("[");

            foreach (RegionInfo info in regionList)
            {
                sb.AppendFormat("{0}\"id\":\"{1}\",\"name\":\"{2}\"{3},", "{", info.RegionId, info.Name, "}");
            }

            if (regionList.Count > 0)
            {
                sb.Remove(sb.Length - 1, 1);
            }

            sb.Append("]");

            return(Content(sb.ToString()));
        }
Beispiel #3
0
        /// <summary>
        /// 省列表
        /// </summary>
        /// <returns></returns>
        public ActionResult ProvinceList()
        {
            List <ha_regions> regionList = Regions.GetProvinceList();

            StringBuilder sb = new StringBuilder();

            sb.Append("[");

            foreach (ha_regions info in regionList)
            {
                sb.AppendFormat("{0}\"id\":\"{1}\",\"name\":\"{2}\"{3},", "{", info.regionid, info.name, "}");
            }

            if (regionList.Count > 0)
            {
                sb.Remove(sb.Length - 1, 1);
            }

            sb.Append("]");

            return(AjaxResult("success", sb.ToString(), true));
        }