home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 April / Chip_1997-04_cd.bin / prezent / cb / data.z / EDCUST.CPP < prev    next >
C/C++ Source or Header  |  1997-01-16  |  1KB  |  34 lines

  1. //---------------------------------------------------------------------------
  2. #include <vcl\vcl.h>
  3. #pragma hdrstop
  4.  
  5. #include "edcust.h"
  6. #include "Datamod.h"
  7. //---------------------------------------------------------------------------
  8. #pragma resource "*.dfm"
  9. TEdCustForm *EdCustForm;
  10. //---------------------------------------------------------------------------
  11. __fastcall TEdCustForm::TEdCustForm(TComponent* Owner)
  12.     : TForm(Owner)
  13. {
  14. }
  15. //---------------------------------------------------------------------------
  16. void __fastcall TEdCustForm::PrintBtnClick(TObject *Sender)
  17. {
  18.   if(MessageBox(Handle,"   Print this form?", "Confirmation",MB_YESNO)==IDYES)
  19.     Print();
  20. }
  21. //---------------------------------------------------------------------------
  22. void __fastcall TEdCustForm::FormCloseQuery(TObject *Sender, bool &CanClose)
  23. {
  24. //  CanClose = MastData->DataSetApplyUpdates(MastData->Cust, ModalResult==mrOk);
  25. }
  26. //---------------------------------------------------------------------------
  27. void TEdCustForm::Edit(double CustNo)
  28. {
  29.   Set<TLocateOption,0,1>flags;
  30.   MastData->Cust->Open();
  31.   MastData->Cust->Locate("CustNo", CustNo, flags);
  32.   ShowModal();
  33. }
  34.