// Method to Update the Inventory List in the InventoryItems class private void UpdateInventoryList(List <InventoryItems> inventory) { InventoryListBox.ClearSelected(); InventoryListBox.Items.Clear(); foreach (InventoryItems item in inventory) { InventoryListBox.Items.Add(item); } UpdateSelected(); }
// Method to Update the Inventory List Box and save the changes public void UpdateInventoryList() { VideoIDSearchTextBox.Text = ""; VideoNameSearchTextBox.Text = ""; MediaTypeSearchComboBox.Text = ""; GenreSearchComboBox.Text = ""; InventoryListBox.ClearSelected(); InventoryListBox.Items.Clear(); foreach (InventoryItems item in im.Inventory) { InventoryListBox.Items.Add(item); } UpdateSelected(); CSVManager.saveCSV(INVENTORY_LOCATION, im.GetCSVList()); }