private void UserRowEnter(object sender, DataGridViewCellEventArgs e) { UserRow user = users[e.RowIndex]; if (bindingSourceRoles.DataSource != user.roleRows) { bindingSourceRoles.DataSource = user.roleRows; } }
public UserEditForm(AerospikeClient client, EditType editType, UserRow user) { this.client = client; this.editType = editType; InitializeComponent(); switch (editType) { case EditType.CREATE: SetRoles(null); break; case EditType.EDIT: this.Text = "Edit User Roles"; userBox.Enabled = false; userBox.Text = user.name; passwordBox.Enabled = false; passwordVerifyBox.Enabled = false; SetRoles(user.roles); oldRoles = user.roles; break; } }