private async void DeleteSecurityGroups() { Enabled = false; PatchData patch = new PatchData(DataAccess.APIs.UserManagement, "User/PatchUser", PatchData.PatchMethods.Remove, UserID, new Dictionary <string, object>() { { "MemberOf", lstSecurityGroups.SelectedItems.Cast <ListViewItem>().Select(lvi => lvi.Text).ToList() } }); await patch.Execute(); await LoadSecurityGroups(); Enabled = true; }
private async void cmdSave_Click(object sender, EventArgs e) { Enabled = false; if (PreselectedSecurityGroups == null) { PatchData patch = new PatchData(DataAccess.APIs.UserManagement, "User/PatchUser", PatchData.PatchMethods.Replace, UserID, new Dictionary <string, object>() { { "MemberOf", _selectedGroups } }); await patch.Execute(); } else { PreselectedSecurityGroups = _selectedGroups; } Close(); }