Exemple #1
0
        private void addProductTypeButton_Click(object sender, RoutedEventArgs e)
        {
            AddProductTypeWindow form = new AddProductTypeWindow();

            form.ShowDialog();
            this.ShowAll();
        }
Exemple #2
0
 void ShowWindowAddProductType() // Wyświetlenie okna dialogowego do wprowadzenia nowego typu produktu
 {
     TemporaryProductTypeName = "";
     _addProductTypeWindow    = new AddProductTypeWindow();
     _addProductTypeWindow.cbIsEdit.IsChecked = false;
     _addProductTypeWindow.tbId.Visibility    = Visibility.Collapsed;
     _addProductTypeWindow.ShowDialog();
 }
Exemple #3
0
 void ShowWindowEditProductType() // Wyświetlenie okna dialogowego do edycji typu produktu
 {
     if (SelectedProductType != null)
     {
         TemporaryProductTypeName = SelectedProductType.Name;
         _addProductTypeWindow    = new AddProductTypeWindow();
         _addProductTypeWindow.cbIsEdit.IsChecked = true;
         _addProductTypeWindow.tbId.Visibility    = Visibility.Visible;
         _addProductTypeWindow.Title     = "Edycja typu produktu";
         _addProductTypeWindow.tbId.Text = "Id: " + SelectedProductType.Id;
         _addProductTypeWindow.ShowDialog();
     }
 }
Exemple #4
0
 private void editProductTypeButton_Click(object sender, RoutedEventArgs e)
 {
     if (productsTypeGrid.SelectedItem != null)
     {
         var edit = (Product_Type)productsTypeGrid.SelectedItem;
         AddProductTypeWindow form = new AddProductTypeWindow(DBContext.Product_Types.Find(edit.ID).ID);
         form.ShowDialog();
     }
     else
     {
         MessageBox.Show("Не выбрано поле для редактирования", "Ошибка");
     }
     this.ShowAll();
 }