public async Task ReactivateUser() { await userEndpoint.ReactivateUser(_user); await RefreshData(); Assert.IsTrue(_user.IsActive); }
private async void ToggleActivateUser(bool toggle) { if (cboUsers.SelectedValue != null) { try { var SelectedUser = (User)cboUsers.SelectedItem; switch (toggle) { case true: await userEndPoint.ReactivateUser(SelectedUser); break; case false: await userEndPoint.DeactivateUser(SelectedUser); break; } } catch (System.Exception ex) { MessageBox.Show(ex.ToString()); } } }