Page 1 of 1

Owner/part-of relationship

Posted: Thu Dec 17, 2009 8:27 am
by humph
Does anyone have a simple code example of an owner/part-of relationship and some forms to maintain it?

Thanks,
H.

Re: Owner/part-of relationship

Posted: Fri Dec 18, 2009 12:35 am
by Dino
Attached is a zip of a simple Order Entry schema.
OrderEntry.zip
Order entry schema and image files
(204.28 KiB) Downloaded 284 times
1. Load the OrderEntrySchema scm and ddb files into JADE.
2. Copy the jpg files into a C:\temp\OrderEntry folder. If they're not in this folder you'll get an exception when you run the JadeScript below.
3. Run the JadeScript createTheLot method to create the initial products and customers.
4. Run the OrderEntryApp application (it's the only application in the schema).
5. Use the two Orders menu items to list or create orders.

Select the Order class, right-click and select Relationships to see a diagram of the peer-to-peer and parent-child (part-of) relationships between the model classes.

OrderBackgroundForm is the MDI Frame. The menu item click methods on this form open the other forms in the application.

Have a look at the OrderCreateForm::btnOK_click method to see how an Order and its OrderLines are created.

Dean.