I am working on a construction program for a school project that uses a database to store info about customers, sites and individual houses. The program is supposed to make an invoice at the form of a PDF which pulls data from 3 tables: the individual house table, the materials used table and the material quantity table.
If the user wants to open an existing one, I want the program to use data binding to fill in the components with data that has been selected previously. For example, I have a datagridview which displays all the houses. When the user selects one of the houses from the datagridview, a new form will appear where they select the materials used. If this has already been selected previously, the program needs to get the value out of the database and fill it in. I was initially going to use loads of SQL queries and fill in each textbox, combo box and all the other controls but figured it would take too much time and would probably be very inefficient. I only just found out about data binding and have seen some simple tutorials online.
Would data binding be a good way to fill in the controls which have already been selected by the user? If so, how would I link it to which plot has been selected on the datagridview on the other form?
Thanks for reading and sorry if I didn't explain it well enough.
What I have tried:
I have followed a few simple tutorials on Youtube using controls on one form and only pulling data from one table