T
TheNortonZ
I have several Winforms that have fields that are data bound to a dataset.
The dataset has about 12 different tables in it/
I have an assembly that does all of my math calculations on the data and I
pass the dataset by reference to the function calls into the assembly.
What I do right now is pass the dataset by reference and then within the
assembly, I copy the dataset data into matching objects and then I do the
calculations using the objects properties. Once I am done, I copy the
objects data back into the dataset and upon return from the function the new
data appears in the winform fields.
I feel that I have ventured down an incorrect road here.
My initial concern was that if I pass a dataset to a component by reference
and then 'some' of the data in the dataset does not calculate correctly,
that the dataset would be automatically updated and upon return from the
function call, I would end up have some good calculation data and some bad.
In other words, with being data bound to this dataset, changes in the
component would be immediately shown, good or bad.
In one way I feel that putting the datasets data into cooresponding objects
is a waste of processing power and space, but on the other hand it does give
me the capability to disconnect my dataset from the bound fields.
So I would ask, what is the correct way to do this? Have I gone down some
poorly designed code intensive path, or does it make sense to do it this
way?
Norton
The dataset has about 12 different tables in it/
I have an assembly that does all of my math calculations on the data and I
pass the dataset by reference to the function calls into the assembly.
What I do right now is pass the dataset by reference and then within the
assembly, I copy the dataset data into matching objects and then I do the
calculations using the objects properties. Once I am done, I copy the
objects data back into the dataset and upon return from the function the new
data appears in the winform fields.
I feel that I have ventured down an incorrect road here.
My initial concern was that if I pass a dataset to a component by reference
and then 'some' of the data in the dataset does not calculate correctly,
that the dataset would be automatically updated and upon return from the
function call, I would end up have some good calculation data and some bad.
In other words, with being data bound to this dataset, changes in the
component would be immediately shown, good or bad.
In one way I feel that putting the datasets data into cooresponding objects
is a waste of processing power and space, but on the other hand it does give
me the capability to disconnect my dataset from the bound fields.
So I would ask, what is the correct way to do this? Have I gone down some
poorly designed code intensive path, or does it make sense to do it this
way?
Norton