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

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