Advertisement
Guest User

Untitled

a guest
Nov 19th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.96 KB | None | 0 0
  1. try
  2.  
  3. GetWebService_SigISSPortType.GerarNota(DescricaoRps, RetornoNota, DescricaoErros);
  4.  
  5. except
  6.  
  7. on E: Exception do
  8.  
  9. begin
  10.  
  11. ShowMessage('Erro: ' + E.Message);
  12.  
  13. end;
  14.  
  15. end;
  16.  
  17.  
  18.  
  19. // Se o processo chamado for executado com sucesso este campo retornará 1. Em caso de falha retornará 0.
  20.  
  21. if (RetornoNota.Resultado = 0) then // Falha
  22.  
  23. begin
  24.  
  25. for intCount := Low(DescricaoErros) to High(DescricaoErros) do
  26.  
  27. ShowMessage('Id: ' + IntToStr(DescricaoErros[intCount].id) + #13 + #13 +
  28.  
  29. 'Processo: ' + DescricaoErros[intCount].DescricaoProcesso + #13 + #13 +
  30.  
  31. 'Descrição: ' + DescricaoErros[intCount].DescricaoErro);
  32.  
  33. end
  34.  
  35. else // Sucesso
  36.  
  37. begin
  38.  
  39. VarLink:=RetornoNota.LinkImpressao;
  40.  
  41. ShellExecute(0, nil, PChar(VarLink), nil, nil, 1);
  42.  
  43.  
  44.  
  45. tabNFSe.Edit;
  46.  
  47. tabNFSeNumeroNota.Value:= RetornoNota.Nota;
  48.  
  49. tabNFSeHash_autenticidade.AsString:= RetornoNota.autenticidade;
  50.  
  51. tabNFSeLink_NFse.AsString:= RetornoNota.LinkImpressao;
  52.  
  53. tabNFSe.Post;
  54.  
  55. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement