private void buttonInsertUsers_Click(object sender, EventArgs e) { AddUserForm userform = new AddUserForm(); userform.ShowDialog(); ShowUsers(); Show(); }
private void buttonUpdateUsers_Click(object sender, EventArgs e) { if (user.Count != 0) { var index = dataGridViewUsers.CurrentRow.Index; AddUserForm userform = new AddUserForm(); userform.user = user[index]; userform.ShowDialog(); ShowUsers(); Show(); } else { MessageBox.Show("Таблица пустая"); } }