//An action handler that add inventories to that inventories private void btnAddInventory_Click(object sender, EventArgs e) { inventories.AddInventories(txtBookTitle.Text, txtAuthor.Text, txtPublisher.Text); List <InventoryItems> items = inventories.getListsItems(); if (lstSummary.Items.Count > 0) { lstSummary.Items.Clear(); } foreach (InventoryItems item in items) { lstSummary.Items.Add("Item successfully Added to Inventory"); lstSummary.Items.Add(""); lstSummary.Items.Add(label2.Text + " " + item.getbookTitle()); lstSummary.Items.Add(label3.Text + " " + item.GetAuthorName()); lstSummary.Items.Add(label4.Text + " " + item.getPubisher()); lstSummary.Items.Add(""); lstSummary.Items.Add("*****************************"); } clearControls(); }