home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 May / VPR9705A.ISO / VPR_DATA / PROGRAM / CBTRIAL / SETUP / DATA.Z / DM.CPP < prev    next >
C/C++ Source or Header  |  1997-02-14  |  1KB  |  39 lines

  1. //----------------------------------------------------------------------------
  2. //Borland C++Builder
  3. //Copyright (c) 1987, 1997 Borland International Inc. All Rights Reserved.
  4. //----------------------------------------------------------------------------
  5. //---------------------------------------------------------------------------
  6. #include <vcl.h>
  7. #pragma hdrstop
  8.  
  9. #include "DM.h"
  10. //---------------------------------------------------------------------------
  11. #pragma resource "*.dfm"
  12. //---------------------------------------------------------------------------
  13. __fastcall TDM1::TDM1(TComponent* Owner)
  14.   : TDataModule(Owner)
  15. {
  16. }
  17. //---------------------------------------------------------------------------
  18.  
  19. TDM1* DM1;
  20.  
  21. void __fastcall TDM1::DM1Create(TObject *Sender)
  22. {
  23.   try {
  24.     Screen->Cursor = TCursor(crHourGlass);
  25.     SQLCustomer->Open();
  26.   }
  27.   catch (...) {}  // dummy catch block to guarantee we get here.
  28.   Screen->Cursor = TCursor(crDefault);
  29. }
  30.  
  31. // This is only called if the Filtered property is True, set
  32. //  dynamically by the CheckBox on the CustView form. 
  33. //
  34. void __fastcall TDM1::SQLOrdersFilterRecord(TDataSet *DataSet, bool &Accept)
  35. {
  36.   Accept = SQLOrdersAmountPaid->Value >= OrdersFilterAmount;
  37. }
  38.  
  39.