Hello, I attached my solution so far. I dont know how to create a collection within the code and read it from the .txt file.
I seriously have tried and just need to know how to create the Inventory Collection so it reads throughout the code. Please help.
Project :
Mainform on load reads inventory items from the file and updates the list box with error checking
(like Part2). Do not display items in the list box if OnHand is 0.
List box SelectedIndexChanged code:
When an item is selected in the list box, the description, retail price and units on hand boxes are
updated. The quantity is set to 1 by default and the subtotal, sales tax and grand total are empty.
Add to cart button code:
Checks to see if an item is selected in the list box and outputs an error if not.
Checks to see if the quantity is valid and outputs an error if it is not
Updates the subtotal, sales tax and grand total of purchase if quantity is valid
Complete purchase button code:
Checks to see if there is an item selected. If not, display an error message
If so, display a message box asking to confirm purchase of the item, quantity and total with yes no
buttons
If the user clicks Yes, reduce the quantity on hand and reset the form