Navigation:  Samples >

Order Maintenance Sample

Previous pageReturn to chapter overviewNext page

This sample shows you the use of the generated code in combination with the Window Editor.

Please look at the following options:

·The sample uses a DaoDatawindow class, so you can dynamically sort on all the fields (of the parent table)
·We have pregenerated some fieldspecs and used those in our JetServers. this reduces the number of entities in the application
·We have chosen not to generated access/assigns for the fields. This also reduces the number of entities & the amount of code. It means that we have to use FieldGet and Fieldput to prevent compiler warnings.
·We have used queries in the database to join the orders & customers table, and to join the details & products table. It is usually much faster to let the Jet Engine to the joins, in stead of doing this ourselves
·The comboboxes for Customer, Shipper and Employee are filled in the PostInit method of the winOrders class. we have used DaoRecordset classes here for speed reasons.
·The relation between the order window  and the details window is set in the PostInit method of the winOrders class
·We have added notify methods on the subform to redisplay the Amount when price, quantity or discount is changed. Also the productname is redisplayed with the product number is changed. There is a notify method on the ordersform that redisplays the total when the freight is changed.
·We have added some logic that when the Bill adress is selected in the listbox, automatically the related fields are redisplayed.

 

It is not a full-blown sample. For example: adding/deleting detail lines has not been implemented.

The sole purpose of this sample is to show you how to use the generated code in combination with some of VO's classes.