private void btnInsert_Click(object sender, EventArgs e) { AddOrEditeForm frmAddorEdite = new AddOrEditeForm(); if (frmAddorEdite.ShowDialog() == DialogResult.OK) { Bingrade(); } }
private void btnEdite_Click(object sender, EventArgs e) { if (dgvCustomers.CurrentRow != null) { int customerID = int.Parse(dgvCustomers.CurrentRow.Cells[0].Value.ToString()); AddOrEditeForm frmAddorEdite = new AddOrEditeForm(); frmAddorEdite.customerID = customerID; if (frmAddorEdite.ShowDialog() == DialogResult.OK) { Bingrade(); } } }