home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1997 May
/
Pcwk0597.iso
/
borland
/
cb
/
setup
/
cbuilder
/
data.z
/
EDPARTS.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1997-02-28
|
1KB
|
40 lines
//---------------------------------------------------------------------------
// Borland C++Builder
// Copyright (c) 1987, 1997 Borland International Inc. All Rights Reserved.
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#include <vcl\vcl.h>
#pragma hdrstop
#include "edparts.h"
#include "Datamod.h"
//---------------------------------------------------------------------------
#pragma resource "*.dfm"
TEdPartsForm *EdPartsForm;
//---------------------------------------------------------------------------
__fastcall TEdPartsForm::TEdPartsForm(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void TEdPartsForm::Edit(Double PartNo)
{
TLocateOptions flags;
MastData->Parts->Open();
MastData->Parts->Locate("PartNo", PartNo, flags);
ShowModal();
}
void __fastcall TEdPartsForm::PrintBtnClick(TObject *Sender)
{
if ( MessageBox(Handle," Print this form?","Confirmation",MB_YESNO) )
Print();
}
//---------------------------------------------------------------------------
void __fastcall TEdPartsForm::FormCloseQuery(TObject *Sender, bool &CanClose)
{
CanClose = MastData->DataSetApplyUpdates(MastData->Parts, ModalResult==mrOk);
}
//---------------------------------------------------------------------------