procedure TForm1.Grid1SelChanged(Sender: TObject);
begin
DataModule1.FDConnection1.Connected := true;
// Abfrage Tel.Nr. welche die Versicherer liefern.
DataModule1.FDQuery_TelNr.SQL.Clear;
DataModule1.FDQuery_TelNr.SQL.Text := SqlAbfragen.Sql_Text('
TelNrVersicherung');
DataModule1.FDQuery_TelNr.ParamByName('
PNR').AsString := FDQueryPerson.FieldByName('
Personennr').AsString;
DataModule1.FDQuery_TelNr.Open;
Edit_Person_privat_Vers.Text := DataModule1.FDQuery_TelNr.FieldByName('
PT').AsString;
Edit_Person_email_Vers.Text := DataModule1.FDQuery_TelNr.FieldByName('
PE').AsString;
Edit_Person_handy_Vers.Text := DataModule1.FDQuery_TelNr.FieldByName('
MT').AsString;
Edit_Person_fax_Vers.Text := DataModule1.FDQuery_TelNr.FieldByName('
GF').AsString;
Edit_Person_arbeit_Vers.Text := DataModule1.FDQuery_TelNr.FieldByName('
GT').AsString;
Edit_Person_url_Vers.Text := DataModule1.FDQuery_TelNr.FieldByName('
GW').AsString;
DataModule1.FDQuery_TelNr.Close;
// Abfrage Tel.Nr. welche der Betreuer selbst eingegeben hat.
DataModule1.FDQuery_TelNr.SQL.Clear;
// DataModule1.FDQuery_TelNr.SQL.Text := SqlAbfragen.Sql_Text('TelNrMakler');
// DataModule1.FDQuery_TelNr.ParamByName('PNR').AsString := FDQueryPerson.FieldByName('Personennr').AsString;
DataModule1.FDQuery_TelNr.sql.Text := '
SELECT Mobil AS MT FROM KONTAKTPERSON WHERE Personnr LIKE :PNR ';
DataModule1.FDQuery_TelNr.ParamByName('
PNR').AsString := '
%11%';
DataModule1.FDQuery_TelNr.Open;
ShowMessage(DataModule1.FDQuery_TelNr.SQL.GetText + '
Count: ' + IntToStr(DataModule1.FDQuery_TelNr.RecordCount));
// Edit_Person_privat_Makler.Text := DataModule1.FDQuery_TelNr_Makler.FieldByName('PT').AsString;
// Edit_Person_email_Makler.Text := DataModule1.FDQuery_TelNr_Makler.FieldByName('PE').AsString;
Edit_Person_handy_Makler.Text := DataModule1.FDQuery_TelNr.FieldByName('
MT').AsString;
// Edit_Person_fax_Makler.Text := DataModule1.FDQuery_TelNr_Makler.FieldByName('GF').AsString;
// Edit_Person_Arbeit_Makler.Text := DataModule1.FDQuery_TelNr_Makler.FieldByName('GT').AsString;
// Edit_Person_url_Makler.Text := DataModule1.FDQuery_TelNr_Makler.FieldByName('GW').AsString;
DataModule1.FDQuery_TelNr.Close;
end;