Árvore de páginas

Descrição

Ponto de entrada executado para validar a inclusão de um bem na arvore.

Observações

Exemplos

User Function MNTA9023()

Local lFOUND := .F., cPAI := ""
Local lCatBem := NGCADICBASE('T9_CATBEM','A','ST9',.f.)

LECONTEDO := .f.
cPAI := Alltrim(cPAI)
Private cItem := cCodBem
ST9->(Dbseek(xFILIAL('ST9')+cPAI))

dDTIMPL := ST9->T9_DTCOMPR
M->T9_CATBEM := If(lCatBem,ST9->T9_CATBEM,Space(1))

If !lFOUND
Dbselectarea("STC")
Dbsetorder(3)
lFOUND := Dbseek(xFILIAL('STC')+cITEM)
Dbsetorder(1)
Endif

If !lFOUND
xx := cPAI
Dbselectarea("STC")
Dbsetorder(2)
While .T.
If Dbseek(xFILIAL('STC')+xx)
If STC->TC_CODBEM == cITEM
lFOUND := .T.
Exit
Endif
Else
Exit
Endif
If XX == STC->TC_COMPONE
Exit
Endif
xx := STC->TC_COMPONE
End
Dbsetorder(1)
Endif

If lFOUND .And. STC->TC_CODBEM <> cITEM
MsgInfo("Bem está vinculado no cadastro de estrutura de bens ao TAG "+Alltrim(STC->TC_CODBEM)+" , portanto, não poderá"+;
" ser inserido diretamente na árvore.Caso queira que este bem seja apresentado na árvore, será necessario que seja"+;
" incluído o TAG ao qual o bem pertence.","ATENÇÃO")
Return .F.
Endif

Return .T.

Preview

Veja também

Idioma

Português(Brasil)

Versões

Versões_Anteriores

Sistemas Operacionais Suportados

Todos

Compatível com as Bases de Dados

Todas

Updates

Parâmetros

Retorno

Eventos de chamada do Ponto de Entrada

Variáveis

Programa Fonte

  • Sem rótulos