private void btnAdd_Click(object sender, EventArgs e) { frmAddEditAnotherPayments frmAdd = new frmAddEditAnotherPayments(); frmAdd.ShowDialog(); GetData(); }
private void btnEdit_Click(object sender, EventArgs e) { if (dgAnotherPayments.CurrentCell != null) { int idPay = int.Parse(dgAnotherPayments.Rows[dgAnotherPayments.CurrentRow.Index].Cells["id"].Value.ToString()); string namePay = dgAnotherPayments.Rows[dgAnotherPayments.CurrentRow.Index].Cells["cName"].Value.ToString(); frmAddEditAnotherPayments frmEdit = new frmAddEditAnotherPayments(idPay, namePay); frmEdit.ShowDialog(); GetData(); } }