private async System.Threading.Tasks.Task SaveUserChanges() { try { await _adminService.UpdateUserAsync(CurrentUser); IsUserInEditMode = false; } catch (TimeoutException timeoutEx) { _eventAggregator.GetEvent <TimeoutErrorEvent>().Publish(timeoutEx); } }
public async System.Threading.Tasks.Task UpdateUser() { Assert.AreNotEqual(Guid.Empty, company.CompanyId); User user = new User(); user.EMail = "*****@*****.**"; user.IsCompanyAdmin = true; user.CompanyId = company.CompanyId; user.FirstName = "Miro"; user.FamilyName = "Furda"; await service.CreateUserAsync(user); Assert.IsNotNull(user.UserId); user.FamilyName = "Neungamat"; await service.UpdateUserAsync(user); List <User> users = await service.ReadAllUsersForCompanyAsync(company.CompanyId); Assert.AreEqual(1, users.Count()); Assert.AreEqual(user.FamilyName, users[0].FamilyName); }
private async Task OnUpdateUser() { if (SelectedUser.ValidateModel()) { try { await _adminService.UpdateUserAsync(SelectedUser); IsUserEditorVisible = false; } catch (TimeoutException timeoutEx) { _eventAggregator.GetEvent <TimeoutErrorEvent>().Publish(timeoutEx); } } }