private void CreateRoleClicked(object sender, EventArgs e) { RoleEditForm form = new RoleEditForm(client, EditType.CREATE, null); ShowRoleEditForm(form); SelectRole(form.RoleName); }
private void SetRoleFields(RoleRow row) { if (bindingSourcePrivs.DataSource != row.privilegeRows) { bindingSourcePrivs.DataSource = row.privilegeRows; } whitelistBox.Text = RoleEditForm.GetWhitelistString(row.whitelist); }
private void EditClicked(object sender, EventArgs e) { try { int row = gridRoles.CurrentRow.Index; if (row >= 0) { RoleEditForm form = new RoleEditForm(client, EditType.EDIT, roles[row]); ShowRoleEditForm(form); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }