private void btnadd_Click(object sender, EventArgs e) { addandedit aae = new addandedit(); aae.ShowDialog(); FillData(); }
private void dataGridView1_DoubleClick(object sender, EventArgs e) { try { addandedit aae = new addandedit(Convert.ToInt32(dataGridView1.CurrentRow.Cells[0].Value)); aae.ShowDialog(); FillData(); } catch (Exception) { MessageBox.Show("Выделите заполненную строку", "Ошибка!", MessageBoxButtons.OK, MessageBoxIcon.Error); } }