private void btnEdit_Click(object sender, EventArgs e) { if (dgViewReport.CurrentRow != null) { int id = int.Parse(dgViewReport.CurrentRow.Cells[0].Value.ToString()); frmNewAccounting frmNewAccounting = new frmNewAccounting(); frmNewAccounting.AccountID = id; if (frmNewAccounting.ShowDialog() == DialogResult.OK) { Filter(); } } }
private void btnNewAccounting_Click(object sender, EventArgs e) { frmNewAccounting frmNewAccounting = new frmNewAccounting(); frmNewAccounting.ShowDialog(); }