private void btn_add_Click(object sender, EventArgs e) { FormAdd frm = new FormAdd(); if (frm.ShowDialog() == DialogResult.OK) { ReloadForm(); } }
private void btn_edit_Click(object sender, EventArgs e) { int rowIndex = dataGridView1.CurrentRow.Index; int colIndex = dataGridView1.Columns["animalID"].Index; string id = dataGridView1[colIndex, rowIndex].Value.ToString(); FormAdd frm = new FormAdd(id); if (frm.ShowDialog() == DialogResult.OK) { ReloadForm(); } }