/// <summary>
 /// 删除角色
 /// </summary>
 public async Task DeleteRole(int id, int tenantId)
 {
     using (CurrentUnitOfWork.SetTenantId(tenantId))
     {
         await _roleAppService.DeleteRole(id);
     }
 }
Example #2
0
 public async Task DeleteRole_Test()
 {
     LoginAsHostAdmin();
     await CreateFakeRole();
     await UsingDbContextAsync(async dbContext =>
     {
         var role = await GetFakeRole(dbContext);
         await _roleAppService.DeleteRole(role.Id);
     });
 }
Example #3
0
        public ActionResult DeleteRole(List <long> ids)
        {
            Result result = roleService.DeleteRole(new DeleteRoleCmdDto()
            {
                RoleIds = ids
            });
            var ajaxResult = AjaxResult.CopyFromResult(result);

            return(Json(ajaxResult));
        }
Example #4
0
 /// <summary>
 /// 删除角色
 /// </summary>
 public async void Delete()
 {
     if (dataPager.SelectedItem is RoleListDto item)
     {
         if (await dialog.Question(Local.Localize("RoleDeleteWarningMessage", item.DisplayName)))
         {
             await SetBusyAsync(async() =>
             {
                 await WebRequest.Execute(() => appService.DeleteRole(
                                              new EntityDto(item.Id)),
                                          RefreshAsync);
             });
         }
     }
 }