public void Edit() { using var dialog = new NewRestrictionDialog(Module, SelectedItem, this); if (dialog.ShowDialog() != DialogResult.OK) { return; } EditItem(dialog.Item); }
public void Add() { using var dialog = new NewRestrictionDialog(Module, null, this); if (dialog.ShowDialog() != DialogResult.OK) { return; } AddItem(dialog.Item); }