1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
void __fastcall TForm1::EditPasswordKeyDown(TObject *Sender, WORD &Key,
TShiftState Shift)
{
if (Key == VK_RETURN)
{
QuerySession ->SQL->Clear() ; // effacer la requet initial
QuerySession ->SQL ->Add("select * from manu_secure where ") ;
QuerySession ->SQL ->Add(" user = '" + EditUser ->Text +"' And ");
QuerySession ->SQL ->Add(" mt_passe = password('" + EditPassword -> Text + "') And" );
QuerySession ->SQL ->Add(" app = '"+ CBApp ->Text+"'" );
QuerySession->ExecSQL() ; // executér la requet
// ACTIVER LES BOUTTONS D ACCES A L APPLICATION
if(QuerySession ->RecordCount != 0)
{BitBtn1 ->Enabled=1;
BitBtn2->Enabled =1;
}
}
} |
Partager