private void btnAddMaterial_Click(object sender, RoutedEventArgs e)
        {
            AddMaterialWindow addMaterialWindow = new AddMaterialWindow();

            addMaterialWindow.ShowDialog();
            addMaterialWindow.edit = false;
            Filter();
        }
        private void btnEditMaterial_Click(object sender, RoutedEventArgs e)
        {
            AddMaterialWindow editMaterialWindow = new AddMaterialWindow();

            editMaterialWindow.btnSave.Content      = "Изменить";
            editMaterialWindow.btnDelete.Visibility = Visibility.Visible;
            editMaterialWindow.edit                          = true;
            editMaterialWindow.txtPrice.Text                 = HelperClass.EditMinMaterial.editNote.Cost.ToString();
            editMaterialWindow.txtName.Text                  = HelperClass.EditMinMaterial.editNote.Name;
            editMaterialWindow.txtMinCount.Text              = HelperClass.EditMinMaterial.editNote.MinimumQuantity.ToString();
            editMaterialWindow.txtCountInBox.Text            = HelperClass.EditMinMaterial.editNote.QuntityInPack.ToString();
            editMaterialWindow.txtCount.Text                 = HelperClass.EditMinMaterial.editNote.QuantityOnStorage.ToString();
            editMaterialWindow.cmbTypeMAterial.SelectedIndex = HelperClass.EditMinMaterial.editNote.idTypeMaterials - 1;
            editMaterialWindow.cmbUnitMaterial.SelectedIndex = HelperClass.EditMinMaterial.editNote.idMaterials - 1;
            //editMaterialWindow.imgMaterial.Source = new BitmapImage(new Uri (HelperClass.EditMinMaterial.editNote.Image));
            editMaterialWindow.ShowDialog();
            selectedMaterial = HelperClass.EditMinMaterial.editNote;
            BDContent.SaveChanges();
            Filter();
        }