コード例 #1
0
        public async Task <object> Deletes(string[] values)
        {
            var json = new ResJson()
            {
                success = false
            };

            try
            {
                if (values != null && values.Length > 0)
                {
                    if (await sysPermissionService.DeleteAsync(values))
                    {
                        json.message = "删除成功!";
                        json.success = true;
                    }
                    else
                    {
                        json.message = "删除失败!";
                    }
                }
                else
                {
                    json.message = "删除失败!";
                }
            }
            catch (Exception ex)
            {
                json.message = "网络超时.";
                throw ex;
            }

            return(json);
        }
コード例 #2
0
 public async Task <IResponseEntity> Delete(string id)
 {
     return(await _sysPermissionService.DeleteAsync(id));
 }