public void AddButton_Click(object sender, EventArgs e) { using (var form = new EditTypeForm()) { form.ShowDialog(); } UpdateGrid(); }
public void EditButton_Click(object sender, EventArgs e) { var t = accountDataGrid.CurrentRow?.DataBoundItem as Type; if (t == null) { return; } using (var form = new EditTypeForm(t)) { form.ShowDialog(); } UpdateGrid(); }