views:

27

answers:

0

What would be the best practice to save information for about 30 TextBoxes in a in-memory database such as a dataset. I want it to be easy to modify in case we need to add or remove information parsed. And make sure that it's easy to update this information from my Parser class to the actual Forms or User Controls.

I also want to make sure that the code in the Windows Forms as clean as possible and that all hard work should be done in the Parser classes.

I've managed to find a few methods but I'm unsure which one is best to save a high amount of entries.

For example:

textBox1.DataBindings.Add("Text", dbCache.Tables["Customer"], "FirstName");

I could also just use traditional textBox1.Text and just simply fetch the data from the dataSet, but it will generate a loot of code in each User Control. I want to make sure that all the hard code is done in the parsing classes and not in the actual Forms or User Controls. And make sure it's easy to pass this data on from the Parser class to the User Controls.

I hope you understand what I mean, if not I will try my best to clarify. :)