private void ShowDialogForListViewItem(CustomListViewItem item)
        {
            if (item is ProductListViewItem)
            {
                var prod = item as ProductListViewItem;

                // детализация заказа в разрезе продукта
                var f = new ProductCustomersView(this, prod);
                f.ShowDialog();
            }
            else if (item is CustomerListViewItem)
            {
                var customer = item as CustomerListViewItem;

                // детализация заказа в разрезе покупателя
                var f = new OrderEditWindow(this, customer, SelectedAlbum);
                f.ShowDialog();
            }
        }
        private void btnEditSelectedOrderAmountClickEventHandler(object sender, RoutedEventArgs e)
        {
            if (lvOrderItems.SelectedItem == null) return;

            var lvi = lvOrderItems.SelectedItem as OrderListViewItem;
            if (lvi == null) return;

            var f = new ProductCustomersView(this, lvi.SourceProduct);
            f.ShowDialog();
            FillOrdersTable();
        }