I read a text file that contains data from another database, load that data line by line into a class, edit the required fields, and then save it to the new database.
This insert processing follows the following pattern:
In View
, I select the text file and the step by parameter for the Controller
, which in turn calls the Model
, which does all the processing and calls the AcessoADados
to save to the database. data.
In%% of Form
, I have a View
, where event BackGroundWorker
calls Do_Work
to start the process.
I also have a Controller
, which updates its values through progressBar
to inform how many the load is.
My question is:
How do I tell backgroundWorker.ReportProgress()
that progress is increasing, with each record inserted, there in class BackGroundWorker
?