Currently I am designing a inventory system, however jumping straight into vb.net was easier said than done. At the moment, all the information stored goes to two places, one being a master file that has all the information ever inputted, and the other being an individual file that is created and named based on the Tag number assigned. The current input fields are:
- Tag Number
- Data Installed
- Type(Computer base unit, monitor, desk, file cabinet, ect)
- Name of Owner
Once inputed the tag number (####.txt) is saved as an independent file with the information as well as the information being stored in the file inventory.txt. I want to be able to search for a certain item using a text box and a keyword, or whether or not it be a computer base unit, or Owners name or anything along those lines and after populating what you want to search for I want to be able to have all the data matching that search information be pulled up.
Another part of the project which may not be possible is a part to edit existing data in 2 ways. Upon submitting the edit I wish to be able to over write the information stored in inventory.txt and I want to add all new information to the independent file. The Tag number will never change but I do want to be able to add a new data, new office, new notes ect. Also doing that is it possible to change the file name, deleting the old one creating a file called ####decommissioned.txt if the computer or desk or anything is no longer being used.
Currently I have a search script that will bring all the information into a msg box, but I have a feeling that it is not the best way to do things. The code for that is:
Dim OpenAnswerFile As New OpenFileDialog Dim strFileName() As String Dim tempStr As String = "" If OpenAnswerFile.ShowDialog = DialogResult.OK Then strFileName = IO.File.ReadAllLines(OpenAnswerFile.FileName) For Each myLine In strFileName tempStr &= myLine & vbNewLine Next MsgBox(tempStr) End If
Which is a code I found from codeorder. I would like to also be able to add a line break upon saving to make reading the code in the msgbox much easier.
If I am unclear on anything, which I assume I may be, please let me know and I will get back to you ASAP. What I am asking may not even be possible, but any help is much appreciated