unit uCSUSTIDtools;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, OleCtrls, SHDocVw,
ActiveX, ExtCtrls,
IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, IdHTTP,StrUtils ;
type
TTFrmMain =
class(TForm)
eUSTID1: TEdit;
eUSTID2: TEdit;
eFirmenname: TEdit;
eOrt: TEdit;
ePLZ: TEdit;
eStrasse: TEdit;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
btnAnfrageSenden: TButton;
csWeb: TWebBrowser;
cmbDrucken: TComboBox;
Label8: TLabel;
Label9: TLabel;
Label10: TLabel;
eRGueltigAb: TEdit;
Label11: TLabel;
eRGueltigBis: TEdit;
Label12: TLabel;
eRFirmenname: TEdit;
Label13: TLabel;
eROrt: TEdit;
Label14: TLabel;
eRPLZ: TEdit;
Label15: TLabel;
eRStrasse: TEdit;
Button1: TButton;
eRAnfrangeAm: TEdit;
Label16: TLabel;
Label17: TLabel;
eRAnfrageUm: TEdit;
Label18: TLabel;
eRErrorCode: TEdit;
Panel1: TPanel;
Label19: TLabel;
Label20: TLabel;
Memo1: TMemo;
IdHTTP1: TIdHTTP;
procedure btnAnfrageSendenClick(Sender: TObject);
private
public
{ Public-Deklarationen }
end;
var
TFrmMain: TTFrmMain;
implementation
uses
mshtml;
{$R *.dfm}
// CEigene
function WB_GetHTMLCode(WebBrowser: TWebBrowser; ACode: TStrings): Boolean;
var
ps: IPersistStreamInit;
ss: TStringStream;
sa: IStream;
s:
string;
begin
ps := WebBrowser.Document
as IPersistStreamInit;
s := '
';
ss := TStringStream.Create(s);
try
sa := TStreamAdapter.Create(ss, soReference)
as IStream;
Result := Succeeded(ps.Save(sa, True));
if Result
then ACode.Add(ss.Datastring);
finally
ss.Free;
end;
end;
procedure TTFrmMain.btnAnfrageSendenClick(Sender: TObject);
var
htmlcode:
string;
begin
csWeb.Navigate('
http://evatr.bff-online.de/evatrRPC?UstId_1='+eUSTID1.Text+
'
&UstId_2='+eUSTID2.Text+
'
&Firmenname='+eFirmenname.Text+
'
&Ort='+eOrt.Text+
'
&PLZ='+ePlz.Text+
'
&Strasse='+eStrasse.Text+
'
&Druck='+cmbDrucken.Text);
WB_GetHTMLCode(csWeb, Memo1.Lines);
end;
end.