Will this object model work

Will this object model work

Old forum URL: forums.lhotka.net/forums/t/5161.aspx


vijay posted on Monday, July 28, 2008

Hi,

I have one screen where user can configure some information. I have to show two grids and some related text boxes for with One save button for the screen. I came with following BOs for this:

EditableRootParent

   EditableChildList1 -> Editable Child1

   EditableChildList2 -> Editable Child2

   EditableChild

When the user comes on the screen i needs to show default values that comes from database. User can modify the information and click on Save button to update the information. Information should be updated in database as Transaction and Save should happen only when all validation rules are passed for the form. Can someone give me an idea if these types of BOs are correct for this scneraion. Will there be any issue during showing/validating or saving the information to database. Thanks

Lalit replied on Monday, July 28, 2008

Hi Vijay,

what i am understanding about your problem is you have a Parent object with some properties and two child lists. In that case you may derive Parent from BusinessBase object, that will consist two child lists derived from BusinessListBase and marked as child. Other properties can directly go into Parent object. You need not to declare another child for those properties.

Please revert if i am not getting you properly or you need more clarity.

vijay replied on Monday, July 28, 2008

You got it correctly Lalit. I will declare properties in BusinessBase in parent instead of seperate Editable Child Object.

I am creating Editable Child Lsit1 and Editable Child Lsit2 as variables of Business Base. Is this how we create child of editable root?

Lalit replied on Monday, July 28, 2008

Absolutely, but do not forget to mark the object as child.

Copyright (c) Marimer LLC