SoapDataForm.pas
上传用户:fh681027
上传日期:2022-07-23
资源大小:1959k
文件大小:1k
源码类别:

Delphi控件源码

开发平台:

Delphi

  1. unit SoapDataForm;
  2. interface
  3. uses
  4.   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  5.   Dialogs, DB, DBClient, SoapConn, Grids, DBGrids, StdCtrls, SoapServerIntf,
  6.   Rio, SoapHTTPClient;
  7. type
  8.   TFormSDC = class(TForm)
  9.     SoapConnection1: TSoapConnection;
  10.     ClientDataSet1: TClientDataSet;
  11.     DBGrid1: TDBGrid;
  12.     DataSource1: TDataSource;
  13.     Button1: TButton;
  14.     Button2: TButton;
  15.     HTTPRIO1: THTTPRIO;
  16.     Button3: TButton;
  17.     procedure Button1Click(Sender: TObject);
  18.     procedure Button2Click(Sender: TObject);
  19.     procedure Button3Click(Sender: TObject);
  20.   private
  21.     { Private declarations }
  22.   public
  23.     { Public declarations }
  24.   end;
  25. var
  26.   FormSDC: TFormSDC;
  27. implementation
  28. {$R *.dfm}
  29. procedure TFormSDC.Button1Click(Sender: TObject);
  30. begin
  31.   ClientDataSet1.Open;
  32. end;
  33. procedure TFormSDC.Button2Click(Sender: TObject);
  34. begin
  35.   ClientDataSet1.ApplyUpdates (-1);
  36. end;
  37. procedure TFormSDC.Button3Click(Sender: TObject);
  38. var
  39.   ISoapData: ISoapTestDm;
  40. begin
  41.   // CURRENTLY DOESN'T WORK!
  42.   ISoapData := HttpRio1 as ISoapTestDm;
  43.   ShowMessage (IntToStr (ISoapData.GetRecordCount));
  44. end;
  45. end.