private void New() { var customer = new Customer(); var form = new CadasterForm(); form.Customer = customer; form.ShowDialog(); }
private void ShowCustomer() { var selected = listView.SelectedItems.Cast <ListViewItem>().FirstOrDefault(); if (selected == null) { return; } var form = new CadasterForm(); form.Customer = (Customer)selected.Tag; form.ShowDialog(); }