File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -148,8 +148,7 @@ object MainView: TMainView
148148 ElementID = ' btnPost'
149149 HeightPercent = 100.000000000000000000
150150 WidthPercent = 100.000000000000000000
151- ExplicitLeft = 445
152- ExplicitTop = 3
151+ OnClick = btnPostClick
153152 end
154153 object btnAlterar: TWebButton
155154 Left = 587
@@ -162,7 +161,6 @@ object MainView: TMainView
162161 ElementID = ' btnAlterar'
163162 HeightPercent = 100.000000000000000000
164163 WidthPercent = 100.000000000000000000
165- ExplicitLeft = 593
166164 end
167165 object btnDelete: TWebButton
168166 Left = 723
@@ -175,7 +173,6 @@ object MainView: TMainView
175173 ElementID = ' btnDelete'
176174 HeightPercent = 100.000000000000000000
177175 WidthPercent = 100.000000000000000000
178- ExplicitLeft = 729
179176 end
180177 end
181178 object mmTeste: TWebMemo
Original file line number Diff line number Diff line change @@ -61,6 +61,8 @@ TMainView = class(TWebForm)
6161 procedure btnGetClick (Sender: TObject);
6262 [Async]
6363 procedure btnListarClick (Sender: TObject);
64+ [Async]
65+ procedure btnPostClick (Sender: TObject);
6466 private
6567
6668 public
@@ -161,4 +163,23 @@ procedure TMainView.btnListarClick(Sender: TObject);
161163 end ;
162164end ;
163165
166+ procedure TMainView.btnPostClick (Sender: TObject);
167+ var
168+ LResponse: TXDataClientResponse;
169+ LCliente: TJSObject;
170+ begin
171+ LCliente := TJSObject.new;
172+ LCliente[' IdCidade' ] := 10 ;
173+ LCliente[' Nome' ] := ' Nome teste ' + FormatDateTime(' zzz' , Now);
174+ LCliente[' Profissao' ] := ' Dev' ;
175+ LCliente[' Limite' ] := 1000 ;
176+ LCliente[' Porcentagem' ] := 88 ;
177+ LCliente[' Ativo' ] := True;
178+
179+ LResponse := TAwait.Exec<TXDataClientResponse>(
180+ XDataWebClient1.RawInvokeAsync(' IClientesService.Post' , [LCliente]));
181+
182+ mmTeste.Lines.Text := LResponse.ResponseText;
183+ end ;
184+
164185end .
You can’t perform that action at this time.
0 commit comments