private void Btn_Click(String s, List<Item> Inventory) { //method that brings up the edit window according to the designated items for(int i = 0; i < Inventory.Count; i++) { if(Inventory[i].Name.ToString().Replace(" ", String.Empty) == s) { //MessageBox.Show(Inventory[x].Name.ToString()); EditProduct editProd = new EditProduct(Inventory[i]); editProd.ShowDialog(); break; } } }
public void EditInventoryTest() { Item product = new Item(); product.Category = "Beer"; product.Name = "Blue Moon"; List <Item> inventory = new List <Item>(); inventory.Add(product); pointofsale_application.EditProduct inv = new pointofsale_application.EditProduct(product); pointofsale_application.AddProduct create = new pointofsale_application.AddProduct(); pointofsale_application.EditInventory einv = new pointofsale_application.EditInventory(inventory); //create.CreateItem("24", "10.25", "Jack", "Jack Bottle", "Whiskey"); //inv.EditItem("31", "21000", "5.55", "Patron", "Tequila", "Tequila"); //inv.DeleteItem(24); }