コード例 #1
0
        public ActionResult Delete(string primaryKey)
        {
            long count = permissionLogic.GetChildCount(primaryKey);

            if (count == 0)
            {
                int row = permissionLogic.Delete(primaryKey.ToStrArray());
                return(row > 0 ? Success() : Error());
            }
            return(Error(string.Format("操作失败,请先删除该项的{0}个子级权限。", count)));
        }