private void addButton_Click(object sender, EventArgs e) { tCardCustomers lets_add_record = new tCardCustomers(); lets_add_record.ShowDialog(this); if (lets_add_record.DialogResult == DialogResult.OK) { //dataGridView1.Rows.Clear(); dataGridView1.Refresh(); FillTable(); } }
private void editButton_Click(object sender, EventArgs e) { tCardCustomers lets_edit_this_record = new tCardCustomers(this, currentRow, currentID); lets_edit_this_record.Show(this); if (lets_edit_this_record.DialogResult == DialogResult.OK) { //dataGridView1.Rows.Clear(); dataGridView1.Refresh(); FillTable(); } }