public void DeleteUser(string userName) { if (userName != null) { userDataService.DeleteUser(userName); } }
public ActionResult DeleteUser([DataSourceRequest] DataSourceRequest request, [Bind(Prefix = "models")] IEnumerable <ManageUserVM> users) { foreach (var user in users) { userService.DeleteUser(user.UPN); } return(Json(users.ToDataSourceResult(request, ModelState))); }
public IActionResult deleteUser(int id) { var delete = _dataService.DeleteUser(id); if (id <= 0) { return(NotFound()); } return(Ok(delete)); }
private async void RemoveUser() { var user = SelectedUser; bool result = await Go(() => _userDataService.DeleteUser(SelectedUser), "Удаление..."); if (result) { Users.Remove(user); } }
public async Task <IActionResult> Delete(int id) { var hasPermission = await _accessManager.HasPermission(User.Identity.Name, _adminSubsystem); if (hasPermission) { await _userData.DeleteUser(id); return(RedirectToAction("Index", "Admin")); } return(Forbid(CookieAuthenticationDefaults.AuthenticationScheme)); }
public IActionResult Delete(string username) { var result = service.DeleteUser(username); return(Content(Newtonsoft.Json.JsonConvert.SerializeObject(result.Result))); }