private void Add_Click(object sender, RoutedEventArgs e) { ModifyAssistant.WindowInfo(1); Window modify = new ModifyAssistant(); modify.ShowDialog(); }
private void Modify_Click(object sender, RoutedEventArgs e) { bool found = false; string SKU_temp = Interaction.InputBox("Ingrese el SKU del producto a modificar", "Buscar por SKU"); if (SKU_temp != "") { foreach (InventoryInfo element in InventoryIO.items) { if (element.SKU == int.Parse(SKU_temp)) { info = element; found = true; } } if (found) { ModifyAssistant.WindowInfo(0); Window modify = new ModifyAssistant(); modify.ShowDialog(); } } if (!found && SKU_temp != "") { MessageBox.Show("No se encontro el elemento.", "Buscar por SKU", MessageBoxButton.OK, MessageBoxImage.Error); } }