CustomerTable - customerId, Name, City, StatusId, TypeId
StatusTable - statusId, status
TypeTable - TypeId, Type
Now, how can i create Enum in CustomerBO to handle these 2 fields [StatusId,TypeId] and also bind the dropdowns in Customer webform with the complete list of Status & Types.
Step 1Public Enum StatusTypes As Integer Active = 0 Inactive = 1End Enum
(Generally when I am associating enums with BO fields, I will create the enums in the same assembly and namespace as the BOs themselves).
Step 2Now open the BO Mapper and navigate to the field you wish to associate with the enum. Select the field and then click "Customize" and then set the Custom Data Type setting:
Click OK...and be sure to rebuild your partial class for the change to take affect.
Step 3Go to your form where you want to populate a combo with an enum. Select the combo and go to the property sheet to setup the enum population:
The main catch here is that the enums [or list of master entries] is generated from the database as i have written in initial case and not really coded as ENUM in the code.
how to handle the db related cases without making too many parent-Child relationship?
Vikram
As for your parent-child relationships, look in the help under: Business Layer -> Common Business Object Tasks -> Defining a relationship between business objects
If this doesn't get you going let me know.