/// <summary> /// 删除角色 /// </summary> public async Task DeleteRole(int id, int tenantId) { using (CurrentUnitOfWork.SetTenantId(tenantId)) { await _roleAppService.DeleteRole(id); } }
public async Task DeleteRole_Test() { LoginAsHostAdmin(); await CreateFakeRole(); await UsingDbContextAsync(async dbContext => { var role = await GetFakeRole(dbContext); await _roleAppService.DeleteRole(role.Id); }); }
public ActionResult DeleteRole(List <long> ids) { Result result = roleService.DeleteRole(new DeleteRoleCmdDto() { RoleIds = ids }); var ajaxResult = AjaxResult.CopyFromResult(result); return(Json(ajaxResult)); }
/// <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); }); } } }