private void NewItem() { var form = new ItemDetail(); form.ShowObject(null); var result = form.ShowDialog(this); if (result == DialogResult.OK) { RefreshList(); } }
private void LoadSelectedItem() { try { var item = itemListBindingSource.Current as ItemInfo; var form = new ItemDetail(); form.ShowObject(item); var result = form.ShowDialog(this); if (result == DialogResult.OK) { RefreshList(); } } catch (Exception exception) { ViewHelper.ShowErrorMessage("Error loading Item information", exception); } }