please help

please help

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


yh_ink posted on Monday, July 17, 2006

I want to know regarding the child object and parent object.How they work???I have one class which is parent and the other class which is child.

I need to save the data from my webform to the child but not to the parent.

i just want to call ordinary save method in my webform but when it goes through the parent it has to save my child in the dataportal update method.what are the rules which i need to look for when it has to be done this way.

please let me know

thanks

RockfordLhotka replied on Monday, July 17, 2006

This is discussed in detail in chapters 7 and 8, along with example code showing how to implement both the parent and child.

yh_ink replied on Monday, July 17, 2006

I have one more question.If i call the save method in the parent will that go to my child object to save  a new record data.

I know that i can have update and make my parent to go to the child and save. will that be possible with by just calling save.

And  how do i call my parent from the webform.

Please let me know...

thanks

RockfordLhotka replied on Monday, July 17, 2006

Again, read chapters 7 and 8 - it is up to you to cascade the call from the parent to the children.

Chapter 10 shows how to build a Web Forms UI on top of your business objects - including how to call the parent object from the Web Form.

yh_ink replied on Monday, July 17, 2006

thanks a lot rocky....for replying...

JonM replied on Monday, July 17, 2006

What's wrong with actually reading the book?  They are written very well and with far fewer errors than just about every other technical book out there.  What you want it a switchable object that can be loaded as either a root or child object.  That way you can load it as a root object when you want to edit by itself or as a child object when it is part of larger parent/root object.  blah.

david.wendelken replied on Tuesday, July 18, 2006

yh_ink:
thanks a lot rocky....for replying...

The books, "Expert C# 2005 Business Objects, Second Edition" and "Expert VB 2005 Business Objects, Second Edition" are really quite excellent.  They are worth every penny.
If you are serious about using this framework, you should view it as an essential investment on your part.

 

RockfordLhotka replied on Tuesday, July 18, 2006

I appreciate the words of support, but please be kind. The books are not necessarily easy to find (or affordable) in all parts of the world and we don't know where the poster lives.

At the same time, I don't feel obligated to answer questions here, when the answers are in the book, or can be inferred from the ProjectTracker sample application.

Copyright (c) Marimer LLC