I'm trying to write a database application from the ground up. To keep
this example simple lets only talk about the customer table. Lets say that
it has a phone, firstname, lastname and address fields in it. I would like
to setup a class or some mechanism to control the data being written so that
for example, I can format the phone number correctly based on parameters the
user sets up and have all the fields upper case.
However, I would like to set this up in a way that its not overly
complicated to display records in a grid for example, or in edit boxes on a
windows form.
By the way, this is 100% windows C# based app, no ASP stuff at the moment.
The reason I'd like to do this should be obvious, but I'd like to set up
this system so that when the GUI guys get ready to drop a field and link it
to the phone number field in my customer table, it will automatically taken
on the knowledge of how to format the phone number properly. And fields
linked to the other fields will know that they need to be uppercase.
WIthout the designer having to do anything at all. I'd like them to only
worry with GUI stuff, not underlying database stuff.
Can anyone point me to a book or article that would do something like this
using .NET C# so that I can see how others are doing this type of function.
I'm tired of programming each field in the program to handle its own
formatting depending on what form I"m on and what I"m doing. I'd somehow
like the data elements to know what to do no matter who drops them on a form
and no matter where in the program they are used.
Thanks,
glenn