private void lvPermissions_DragDrop(object sender, DragEventArgs e) { var ddo = getDragDropObject(e); AdminProxy.AddPermissionsToGroup(ID, ddo.IDList); RefreshData(); }
private void popupAddPermission() { if (ID < 1) { if (DialogResult.Yes == MessageBox.Show(this, getDisplayMember("popupAddPermission{prompt_body}", "You must save the group before adding permissions to it.\nDo you want to save it now?"), getDisplayMember("popupAddPermission{prompt_title}", "Save Group?"), MessageBoxButtons.YesNo, MessageBoxIcon.Question)) { save(false); } else { return; } } frmPermissions fp = new frmPermissions(); foreach (ListViewItem lvi in lvPermissions.Items) { fp.AssignedIDs.Add(Toolkit.ToInt32(lvi.Tag, -1)); } if (DialogResult.OK == MainFormPopupForm(fp, this, true)) { // add selected permission to user, refresh AdminProxy.AddPermissionsToGroup(ID, fp.SelectedIDs); RefreshData(); } }