[DUG] Which event to use

Charlie kerscher at bellsouth.net
Mon Oct 19 03:07:25 NZDT 2009


Thanks David for your help.

RE: If Field is assigned then that is the field which just changed so you
can check if Field is one of the fields which should modify the price and if
so call your routine for recalculating the price.

There are 24 fields for each orderdetail record. 23 of these have an effect
either on the square foot price or the total for the record. Of course the
square foot price has an effect on the total since the square foot price is
multiplied by the quantity and the square feet of the box. To this is added
the upcharges for various options to arrive at the total for the box.

12 of the 24 fields are always used for each box.

Am I right in understanding that the TDataSource.OnDataChange will fire each
time there is an edit to each of these 24 fields? By edit I'm thinking of a
change in the existing value in the control,  deleting the value in the
control, adding a value to the control. If any of these things occur in one
of the 23 fields this could effect either the square foot price or the
record total.

I'm not quite sure what 'If Field is Assigned' really means. 

There are two fields that are used to set values for all boxes for the
orders. The InfoPower dbLookupCombo (which I use for these) has a OnCloseUp
which I use for those two fields. But these values can be overridden by
corresponding fields for a record. Again I use the InfoPower dbLookupCombo
and it's OnCloseUp event to call the 'calculate' price method. It appears I
wouldn't have to do that if I use the TDataSource.OnDataChange event.

 

Appreciate your help, David. Thanks to all.

Charlie 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20091018/52c87f9e/attachment.html 


More information about the Delphi mailing list