private void RemoveItem() { MessageViewInfo.MessageBoxButtons = MessageBoxButtons.YesNo; MessageViewInfo.MessageBoxIcon = Fwk.Bases.FrontEnd.Controls.MessageBoxIcon.Question; if (MessageViewInfo.Show("Are you sure to remove selected users from current role : " + selectedRol.RolName) == DialogResult.Yes) { UserList removedUsersList = new UserList(); foreach (DataGridViewRow row in grdUsers.SelectedRows) { removedUsersList.Remove(((User)row.DataBoundItem)); } FwkMembership.RemoveUsersFromRole(removedUsersList.GetArraNames(), selectedRol.RolName, frmAdmin.Provider.Name); grdUsers.DataSource = FwkMembership.GetUsersDetailedInRole(selectedRol.RolName, frmAdmin.Provider.Name); grdUsers.Refresh(); } SetMessageViewToDefault(); }
private void RemoveItem() { MessageViewInfo.MessageBoxButtons = MessageBoxButtons.YesNo; MessageViewInfo.MessageBoxIcon = Fwk.Bases.FrontEnd.Controls.MessageBoxIcon.Question; if (MessageViewInfo.Show("Are you sure to remove selected users from current role : " + selectedRol.RolName) == DialogResult.Yes) { UserList removedUsersList = new UserList(); foreach (DataGridViewRow row in grdUsers.SelectedRows) { removedUsersList.Remove(((User)row.DataBoundItem)); } FwkMembership.RemoveUsersFromRole(removedUsersList.GetArraNames(), selectedRol.RolName, frmAdmin.Provider.Name); grdUsers.DataSource = FwkMembership.GetUsersDetailedInRole(selectedRol.RolName, frmAdmin.Provider.Name); grdUsers.Refresh(); } SetMessageViewToDefault(); }