private void b_Edit_Click(object sender, RoutedEventArgs e)
        {
            if (dg_goods.SelectedItems.Count == 0) {
                MessageBox.Show("Позиция не выбрана", "Внимание!"); 
                return; 
            }

            Good item = (Good)dg_goods.SelectedValue;

            CreateEdit CEWindow = new CreateEdit();
            CEWindow.IsEdit = EWStatus.Edit;
            CEWindow.GoodToEdit = item;

            CEWindow.ShowDialog();
        }
 private void b_Add_Click(object sender, RoutedEventArgs e)
 {
     CreateEdit CEWindow = new CreateEdit();
     CEWindow.IsEdit = EWStatus.Create;
     CEWindow.ShowDialog();
 }