Exemple #1
0
        private void dgStorage_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            if (dgStorage.SelectedItem == null)
            {
                return;
            }
            StorageRecord record = (StorageRecord)dgStorage.SelectedItem;

            ShowStorageEditWindow(record.id);
        }
Exemple #2
0
        private void btnEditProduct_Click(object sender, RoutedEventArgs e)
        {
            if (dgStorage.SelectedItem == null)
            {
                return;
            }
            StorageRecord record = (StorageRecord)dgStorage.SelectedItem;

            ShowStorageEditWindow(record.id);
        }
Exemple #3
0
        private void btnDeleteProduct_Click(object sender, RoutedEventArgs e)
        {
            if (dgStorage.SelectedItem == null)
            {
                return;
            }
            StorageRecord record = (StorageRecord)dgStorage.SelectedItem;

            try
            {
                StorageSetup.DeleteProduct(record.id);
                DialogHelper.ShowError("Produkt byl odstraněn");
                StorageSetup.InitializeStorageTable(dgStorage);
            }
            catch
            {
                DialogHelper.ShowError("Produkt nemohl být odstraněn");
            }
        }