コード例 #1
0
ファイル: PartialController.cs プロジェクト: dmhai/ColoPay
        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));
        }
コード例 #2
0
ファイル: ToolController.cs プロジェクト: hzl091/BrnShop-1
        /// <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()));
        }
コード例 #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));
        }