Ejemplo n.º 1
0
        /// <summary>
        /// 获取当前用户可以操作的所有指定类型的区域
        /// </summary>
        /// <param name="RegionType">区域类型</param>
        /// <returns>Tuple(RegionID, RegionName)[]</returns>
        public ActionResult GetAllRegions(int RegionType)
        {
            if (RegionType < 1 || RegionType > 3)
            {
                return(Json(new SelectResult <Tuple <long, string>[]>()
                {
                    Message = "非法的区域类型。"
                }, JsonRequestBehavior.AllowGet));
            }

            var regions = TerminalSettingsBLL.GetAllRegions(base.CurrentUserID, RegionType);

            return(Json(new SelectResult <Tuple <long, string>[]>()
            {
                DataResult = regions
            }, JsonRequestBehavior.AllowGet));
        }