Histórico da Página
...
Informações |
---|
A partir do pacote SmartLink 2.5.7 o Credential Helper se encontrará disponível e com isso a etapa de preenchimento de credenciais no wizard não estará habilitada para preenchimento podendo ser avançada normalmente. Caso possua a necessidade ou queira realizar o preenchimento manual das credenciais adicione a opção de configuração de credenciais no configurador do Protheus. |
Bloco de código | ||
---|---|---|
| ||
#include "protheus.ch" /*/{Protheus.doc} WizardTF Wizard para ativação da integração com a TechFin /*/ Main Function WizardTF() MsApp():New( "SIGAFIN" ) oApp:cInternet := Nil __cInterNet := NIL oApp:bMainInit := { || ( oApp:lFlat := .F. , TechFinWiz() , Final( "Encerramento Normal" , "" ) ) }//"Encerramento Normal" oApp:CreateEnv() OpenSM0() PtSetTheme( "TEMAP10" ) SetFunName( "UPDDISTR" ) oApp:lMessageBar := .T. oApp:Activate() Return /*/{Protheus.doc} FintechWiz Construção da Tela de Wizard @return Nil /*/ Static Function TechFinWiz() Local oWizard As Object Local cDescription As Character Local bConstruction As CodeBlock Local bNextAction As CodeBlock Local bPrevWhen As CodeBlock Local bCancelWhen As CodeBlock Local bProcess As CodeBlock Local aParam As Array Local cReqDes As Character Local cReqCont As Character Local bReqVld As CodeBlock Local cReqMsg As Character oWizard := FWCarolWizard():New() cDescription := "Novo Passo " bConstruction := { | oPanel | aParam := StepPage( oPanel ) } bNextAction := { || VldStep( aParam ) } bPrevWhen := { || .F. } bCancelWhen := { || .T. } // bProcess := { | cGrpEmp, cMsg | FINTFWizPr( cGrpEmp, cMsg, aFinParam ) } bProcess := { | cGrpEmp, cMsg | ProcAnt( cGrpEmp, @cMsg, aParam ) } cReqDes := "Release do RPO cReqCont := GetRpoRelease() bReqVld := { || GetRpoRelease() >= "12.1.023" } cReqMsg := "Versão de RPO deve ser no mínimo 12.1.23" oWizard:SetWelcomeMessage( "Minha mensagem de boas vindas customizada" ) oWizard:AddRequirement( cReqDes, cReqCont, bReqVld, cReqMsg ) oWizard:AddStep( cDescription + "1", bConstruction, bNextAction, bPrevWhen, bCancelWhen ) oWizard:AddStep( cDescription + "2", bConstruction, bNextAction, bPrevWhen, bCancelWhen ) oWizard:AddStep( cDescription + "3", bConstruction, bNextAction, bPrevWhen, bCancelWhen ) // oWizard:AddStep( cDescription + "4", bConstruction, bNextAction, bPrevWhen, bCancelWhen ) oWizard:AddProcess( bProcess ) oWizard:SetTrialMode(.T.) //Default .F. // oWizard:SetExclusiveCompany(.F.) //Default .T. // oWizard:UsePlatformAccess(.F.) //Default .T. oWizard:Activate() Return /*/{Protheus.doc} ProcAnt Processamento de regra de negócio @type function @author izac.ciszevski @param cGrpEmp, character, grupo de empresa logado @param cMsg, character, mensagem de erro de retorno @param aParam, array, parâmetros para da etapa de configuração @return logical, sucesso ou falha /*/ Static Function ProcAnt( cGrpEmp, cMsg, aParam ) cMsg := "Falha na gravação da regra X" Return .T. /*/{Protheus.doc} IntegrationPage Monta o layout para a página de informações da Integração @param oPanel, object, painel onde será montada a tela /*/ Static Function StepPage( oPanel As Object ) Local aParam As Array Local oConfig As Object oConfig := FWTFConfig() aParam := Array( 5 ) aParam[ 1 ] := Space( 32 ) aParam[ 2 ] := Space( 32 ) aParam[ 3 ] := Space( 36 ) aParam[ 4 ] := Space( 32 ) aParam[ 5 ] := Space( 32 ) @ 010, 045 GROUP TO 55, 380 PROMPT "Informações" of oPanel PIXEL @ 025, 055 SAY "Dados" SIZE 200, 20 OF oPanel PIXEL @ 032, 055 MSGET aParam[ 4 ] SIZE 110, 09 OF oPanel PIXEL @ 025, 175 SAY "Dados" SIZE 200, 20 OF oPanel PIXEL @ 032, 175 MSGET aParam[ 5 ] SIZE 110, 09 OF oPanel PIXEL @ 066, 45 GROUP TO 130, 380 PROMPT "Informações" of oPanel PIXEL @ 075, 055 SAY "Dados" SIZE 200, 20 OF oPanel PIXEL @ 082, 055 MSGET aParam[ 1 ] SIZE 110, 09 OF oPanel PIXEL @ 075, 175 SAY "Dados" SIZE 200, 20 OF oPanel PIXEL @ 082, 175 MSGET aParam[ 2 ] SIZE 110, 09 OF oPanel PIXEL @ 102, 055 SAY "Dados" SIZE 200, 20 OF oPanel PIXEL @ 109, 055 MSGET aParam[ 3 ] SIZE 110, 09 OF oPanel PIXEL Return aParam /*/{Protheus.doc} VldStep Validação da etapa de negócio @type function @author izac.ciszevski @param aParam, array, informações preenchidas @return logical, sucesso ou falha na validação /*/ Static Function VldStep( aParam ) Return .T. |
...
Visão Geral
Import HTML Content
Conteúdo das Ferramentas