101
}
//
void fastcall TFKLIENT::Button1Click(TObject *Sender)
{
DM->KLIENT-
>Insert(); DM-
>KLIENT->Edit();
DM->KLIENTFIO->AsString = Edit4->Text;
DM->KLIENTSERIA_P->AsString
= Edit5->Text; DM->KLIENTNOMER_P-
>AsString = Edit8->Text; DM-
>KLIENTEMAIL->AsString = Edit6-
>Text; DM->KLIENTMOBTEL->AsString
= Edit7->Text; DBGrid1-
>SetFocus();
}
//
void fastcall TFKLIENT::Button2Click(TObject *Sender)
{
if (Application-
>MessageBox("Действительно хотите удалить
запись?","Подтвердите удаление записи",
MB_YESNO +
MB_ICONEXCLAMATION) == IDYES)
DM->KLIENT->Delete();
}
//
void fastcall TFKLIENT::Button3Click(TObject *Sender)
{
if (DM->KLIENT->Modified) DM->KLIENT->Post();
}
//
void fastcall TFKLIENT::Edit1Change(TObject *Sender)
{
TLocateOptions
SearchOptions; Variant
locvalues[] = {Edit1->Text};
DM->KLIENT->Locate("FIO",
VarArrayOf(locvalues,1),
SearchOptions<<loPartialKey<<loCaseInse
nsitive);
}
//
void fastcall TFKLIENT::Edit2Change(TObject *Sender)
{
TLocateOptions
SearchOptions; Variant
locvalues[] = {Edit1->Text};
DM->KLIENT->Locate("SERIA_P",
VarArrayOf(locvalues,1),