); __fastcall DBGrid1Enter (TObject * Sender); __fastcall FormCreate (TObject * Sender); __fastcall DBLookupComboBox1CloseUp (TObject * Sender); __fastcall Button1Click (TObject * Sender); __fastcall Button2Click (TObject * Sender); __fastcall Button3Click ( TObject * Sender);: / / User declarations: / / User declarations
__fastcall TFrictSitesForm (TComponent * Owner);
};
/ / --------------------------------------------------------------------------- PACKAGE TFrictSitesForm * FrictSitesForm;
/ / ---------------------------------------------------------------------------
# endif
Файл: FrictSites.cpp
/ / ---------------------------------------------------------------------------
# include
# pragma hdrstop
# include «FrictSites.h»
# include «Sites.h»
# include «DataModule.h»
/ / ---------------------------------------------------------------------------
# pragma package (smart_init)
# pragma resource «*. dfm» * FrictSitesForm;
/ / ---------------------------------------------------------------------------
__fastcall TFrictSitesForm :: TFrictSitesForm (TComponent * Owner)
: TForm (Owner)
{
}
//---------------------------------------------------------------------------__fastcall TFrictSitesForm :: DBGrid1CellClick (TColumn * Column)
{
NumFrictSite-> Text=DM-> FrictSitesTable-> FieldByName («NumFrictSite») -> AsString;> Text=DM-> FrictSitesTable-> FieldByName («NameFrictSite») -> ; Value;
}
/ / --------------------------------------------------------------------------- __fastcall TFrictSitesForm :: DBGrid1Enter (TObject * Sender)
{> Text=DM-> FrictSitesTable-> FieldByName («NumFrictSite») -> AsString;> Text=DM-> FrictSitesTable-> FieldByName («NameFrictSite») -> Value;
}
//---------------------------------------------------------------------------__fastcall TFrictSitesForm :: FormCreate (TObject * Sender)
{> SitesTable-> Active=true;> SitesTable-> First ();
/ / ListSites-> Clear (); (! DM-> SitesTable-> Eof)
{
/ / ListSites->Items->Add(DM->SitesTable->FieldByName(«NameSite»)->AsString);>SitesTable->Next();
}
/ / ListSites-> ItemIndex=0;> SitesTable-> First ();
}
//---------------------------------------------------------------------------__fastcall TFrictSitesForm :: DBLookupComboBox1CloseUp (TObject * Sender)
{-> Visible=true; -> SetFocus ();
}
//---------------------------------------------------------------------------__fastcall TFrictSitesForm :: Button1Click (TObject * Sender)
{>SitesTable->Edit();&a...