Esempio n. 1
0
        public JsonResult EditRegion(int regionId, string regionName)
        {
            if (string.IsNullOrWhiteSpace(regionName))
            {
                throw new HimallException("区域名称不能为空");
            }
            if (regionName.Length > 30)
            {
                throw new HimallException("区域名称30个字符以内");
            }
            RegionApplication.EditRegion(regionName, regionId);

            return(Json(new Result()
            {
                success = true, msg = "修改成功!"
            }));
        }