1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[RESOLVIDO] Leitura de registros de BROWSE em UPC

Discussão em 'EMS , HCM e Totvs 11' iniciado por erickles, Maio 8, 2014.

Status do Tópico:
Não esta aberto para novas mensagens.
  1. rodolfo.rcs

    rodolfo.rcs Membro Participativo

    Teria o fonte do busca widget ?
  2. elmo

    elmo Membro Ativo

    Código:
    /************** Procedure para Buscar o Handle da Tela **************/
    /*                                                                  */
    /*     run pi-busca-widget(input '<objeto da tela>',                */
    /*                         input  p-wgh-frame,                      */
    /*                         output <variavel criada).                */
    /*                                                                  */
    /********************************************************************/
    def var wh-frame-comp           as character    no-undo.
    
    procedure pi-busca-widget:
    
        def input  param p-nome     as char.
        def input  param p-frame    as widget-handle.
        def output param p-object   as widget-handle.
       
        def var h-frame             as widget-handle.
        def var wh-objeto           as widget-handle.
        def var wh-frame            as character    no-undo.
        def var c-type              as character.
    
        assign wh-frame = p-frame:name no-error.
    
        assign  c-type = entry(2,p-nome,chr(10)) no-error.
        assign  p-nome = entry(1,p-nome,chr(10)) no-error.
       
        assign h-frame = p-frame:first-child no-error.
    
        do while valid-handle(h-frame):
    
            if h-frame:type <> 'field-group' then do:
    
                if h-frame:type = 'frame'   and
                   (c-type      = ""        or
                    c-type      = "frame")  then do:
                   
                    run pi-busca-widget(input  p-nome,
                                        input  h-frame,
                                        output wh-objeto).
    
                    if wh-objeto <> ? then do:
                       
                        assign p-object = wh-objeto.
                        leave.
    
                    end.
    
                end.
    
                if h-frame:type = "Literal"  and
                   (c-type      = ""         or
                    c-type      = "Literal") and
                   h-frame:screen-value matches "*" + p-nome + "*" then do:
    
                    assign p-object = h-frame.
                   /*leave*/.
    
                end.
    
                if  h-frame:name    = p-nome        and
                   (c-type          = h-frame:type  or
                    c-type          = "")           and
                   (wh-frame-comp   = ""            or
                    (wh-frame-comp  = wh-frame))    then do:
    
                    assign p-object = h-frame.
                    leave.
    
                end.
    
                assign h-frame = h-frame:next-sibling.
    
            end.
            else
                assign h-frame = h-frame:first-child.
    
        end.
    
    end procedure.
    
  3. rodolfo.rcs

    rodolfo.rcs Membro Participativo

    Vlw Elmo.
Status do Tópico:
Não esta aberto para novas mensagens.

Compartilhe esta Página