public InventoryForm() { InitializeComponent(); inventory.addItem(1, "Cookies", 2.51, 25); inventory.addItem(2, "Crackers", 3.11, 30); inventory.addItem(3, "Soda", 2.99, 45); inventory.displayInventory(itemList); }
public InventoryForm() { InitializeComponent(); inventory.addItem(1, "Item 1", 4.51, 3); inventory.addItem(2, "Item 2", 13.11, 3); inventory.addItem(3, "Item 3", 2.22, 8); inventory.displayInventory(itemList); }
private void removalButton_Click(object sender, EventArgs e) { int id = Int32.Parse(idTextBox.Text); inventory.removeItem(id); inventory.displayInventory(itemList); Close(); }
private void button1_Click(object sender, EventArgs e) { int id = Int32.Parse(idTextBox.Text); int newQuantity = Int32.Parse(quantityTextBox.Text); inventory.restock(id, newQuantity); inventory.displayInventory(itemList); Close(); }