procedure TForm1.Grid1SelChanged(Sender: TObject);
begin
DataModule1.FDConnection1.Connected:= true;
// Abfrage Tel.Nr. welche die Versicherer liefern.
with DataModule1.FDQuery_TelNr
do
begin
SQL.Clear;
SQL.Text:=SqlAbfragen.Sql_Text('
TelNrVersicherung');
ParamByName('
PNR').AsString := FDQueryPerson.FieldByName('
Personennr').AsString;
Open;
end;
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;
// Abfrage Tel.Nr. welche der Betreuer selbst eingegeben hat.
with DataModule1.FDQuery_TelNr
do
begin
SQL.Clear;
// SQL.Text:=SqlAbfragen.Sql_Text('TelNrMakler');
// ParamByName('PNR').AsString := FDQueryPerson.FieldByName('Personennr').AsString;
sql.Text:= '
SELECT Mobil AS MT, Privat AS PT, Arbeit AS GT, Fax AS GF, EMail AS PE, URL AS GW FROM KONTAKTPERSON WHERE Personnr LIKE ''
11025177''
' ;
Open;
//HIER KOMMT NICHTS - IM DB-BROWSER ABER SCHON
end;
ShowMessage(DataModule1.FDQuery_TelNr.SQL.GetText + '
Count: '+ IntToStr(DataModule1.FDQuery_TelNr.RecordCount));
Edit_Person_privat_Makler.Text:= DataModule1.FDQuery_TelNr.FieldByName('
PT').AsString;
Edit_Person_email_Makler.Text:= DataModule1.FDQuery_TelNr.FieldByName('
PE').AsString;
Edit_Person_handy_Makler.Text:= DataModule1.FDQuery_TelNr.FieldByName('
MT').AsString;
Edit_Person_fax_Makler.Text:= DataModule1.FDQuery_TelNr.FieldByName('
GF').AsString;
Edit_Person_Arbeit_Makler.Text:= DataModule1.FDQuery_TelNr.FieldByName('
GT').AsString;
Edit_Person_url_Makler.Text:= DataModule1.FDQuery_TelNr.FieldByName('
GW').AsString;
end;