private void btnAddRecord_Click(object sender, EventArgs e) { using (var page = new AddEstatePage()) { page.ShowDialog(); } EstatePage_Load(null, null); }
private void EditRecord() { using (var page = new AddEstatePage()) { if (dgv.CurrentRow != null) { page.EstateId = (int)dgv.CurrentRow.Cells["clnId"].Value; page.ShowDialog(); } } EstatePage_Load(null, null); }