Custom Control +Shopping Cart Options
-
Hey, Okay here's the problem. I have a product line with shoes and clothes. The database for the productline looks like this. <-Table: Products-> ProductId ProductDescription ProductName ProductPrice ProductOption Now depending if the product is a shoe or a peice of clothing the ProductOption has a value of 0 or 1. When it is a 0 it is a shoe. When showing a shoe I want to be able to have a dropdown combobox that will allow the user to select the shoe size. But when it is not a shoe I don't want to see this control at all. Now this is a simple version but of what I am trying to accomplish. My product option actually ranges from 0 to 11 and I need different controls for each one. Some have textboxes and some have dropdowns. Can anyone give me some insight into how this is usually done? Or a tutorial posted somewhere that might lead to some answers? Thanks so much!:wtf:
-
Hey, Okay here's the problem. I have a product line with shoes and clothes. The database for the productline looks like this. <-Table: Products-> ProductId ProductDescription ProductName ProductPrice ProductOption Now depending if the product is a shoe or a peice of clothing the ProductOption has a value of 0 or 1. When it is a 0 it is a shoe. When showing a shoe I want to be able to have a dropdown combobox that will allow the user to select the shoe size. But when it is not a shoe I don't want to see this control at all. Now this is a simple version but of what I am trying to accomplish. My product option actually ranges from 0 to 11 and I need different controls for each one. Some have textboxes and some have dropdowns. Can anyone give me some insight into how this is usually done? Or a tutorial posted somewhere that might lead to some answers? Thanks so much!:wtf:
Insted of special caseing each Item had you considered having a object for each item with it's very own rendering section? you could use an object factory to prodce the object related to the database information?
-
Insted of special caseing each Item had you considered having a object for each item with it's very own rendering section? you could use an object factory to prodce the object related to the database information?
-
Hey Jason, Thanks very much for taking the time to reply. You suggested and object factory. This sounds quite interesting, I have never heard of something like this. Is there a tutorial or some documentation on what you are describing? Thanks very much.
http://www.dofactory.com/Patterns/PatternFactory.aspx[^] This is the basic concept. feel free to email me if you have any more questions.