home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1997 May / Pcwk0597.iso / borland / cb / setup / cbuilder / data.z / CUSTDM.CPP < prev    next >
C/C++ Source or Header  |  1997-02-28  |  1KB  |  26 lines

  1. //----------------------------------------------------------------------------
  2. //Borland C++Builder
  3. //Copyright (c) 1987, 1997 Borland International Inc. All Rights Reserved.
  4. //----------------------------------------------------------------------------
  5. //---------------------------------------------------------------------------
  6. #include <vcl\vcl.h>
  7. #pragma hdrstop
  8.  
  9. #include "CustDM.h"
  10. //---------------------------------------------------------------------------
  11. #pragma resource "*.dfm"
  12. TDataModule2 *DataModule2;
  13. //---------------------------------------------------------------------------
  14. __fastcall TDataModule2::TDataModule2(TComponent* Owner)
  15.   : TDataModule(Owner)
  16. {
  17. }
  18. //---------------------------------------------------------------------------
  19. void __fastcall TDataModule2::LineItemsCalcFields(TDataSet *DataSet)
  20. {
  21. LineItemsExtendedPrice->Value = LineItemsPrice->Value *
  22.     ((100 - LineItemsDiscount->Value) / 100);
  23.   LineItemsTotal->Value = LineItemsExtendedPrice->Value *
  24.     LineItemsQty->Value;
  25. }
  26. //---------------------------------------------------------------------