Hey all, I have played around with a 3-tier design for about 1 year and am able to make your basic applications using them.
My problem is this. Say that you have a Customer class. I would populate a list box on a form with the customer object and when a user selects a customer all the other fields would be displayed in text boxes / combo boxes on the form. The problem is that the state field would show the ID of the states table and not the state name. How would i populate a states dropdownlist on the customers form so that the user could select which state the customer lives in? Do I create a states class? If so how would I incoprorate it in the customer class? Do i just use a sql statement in the code behind the form, which pretty much ruins the whole 3 tier thing?
My business tier classes look like this. clsCustomer and clsCustomers. clsCustomers is i guess a helper class to the clsCustomer. clsCustomer has all of the properties and the clsCustomers has all of the update/delete functions.
I hope this all makes sense.
Thanks Hooks
My problem is this. Say that you have a Customer class. I would populate a list box on a form with the customer object and when a user selects a customer all the other fields would be displayed in text boxes / combo boxes on the form. The problem is that the state field would show the ID of the states table and not the state name. How would i populate a states dropdownlist on the customers form so that the user could select which state the customer lives in? Do I create a states class? If so how would I incoprorate it in the customer class? Do i just use a sql statement in the code behind the form, which pretty much ruins the whole 3 tier thing?
My business tier classes look like this. clsCustomer and clsCustomers. clsCustomers is i guess a helper class to the clsCustomer. clsCustomer has all of the properties and the clsCustomers has all of the update/delete functions.
I hope this all makes sense.
Thanks Hooks