private void btnAdd_Click(object sender, EventArgs e) { using (var form = new CertificateForm()) { if (form.ShowDialog() == DialogResult.OK) { FillCertificatesTable(); } } }
private void btnEdit_Click(object sender, EventArgs e) { if (currentCertificate == null) { return; } using (var form = new CertificateForm(currentCertificate)) { if (form.ShowDialog() == DialogResult.OK) { FillCertificatesTable(); } } }