C
catherine
Hi, I was wondering if anyone had any ideas / opinions on what the
best way would be to automatically save to and re-populate a form from
a business object would be.
I usually find myself spending a ton of time hooking up my GUI to my
business objects to save the object to the database and then the same
amount of time in reverse repopulating the GUI from the business
object.
e.g. Say I have a person object
public struct person
{
string firstName;
string lastName;
}
and I want to assign values from a form (where txtFirstName and
txtLastName are textboxes)
person employee = new person();
employee.firstName = txtFirstName.Text;
employee.lastName = txtLastName.Text;
Then repeat the above for multiple forms and then in reverse to re-
populate the form.... boring cookie cutting code..
There must be a better way to do this, has anyone got any better
suggestions/ commercial products/ free products?
Thanks
Catherine
best way would be to automatically save to and re-populate a form from
a business object would be.
I usually find myself spending a ton of time hooking up my GUI to my
business objects to save the object to the database and then the same
amount of time in reverse repopulating the GUI from the business
object.
e.g. Say I have a person object
public struct person
{
string firstName;
string lastName;
}
and I want to assign values from a form (where txtFirstName and
txtLastName are textboxes)
person employee = new person();
employee.firstName = txtFirstName.Text;
employee.lastName = txtLastName.Text;
Then repeat the above for multiple forms and then in reverse to re-
populate the form.... boring cookie cutting code..
There must be a better way to do this, has anyone got any better
suggestions/ commercial products/ free products?
Thanks
Catherine