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

UPC - Folder

Discussão em 'Outros/Diversos' iniciado por fdantas, Fevereiro 12, 2009.

  1. fdantas

    fdantas Administrator Moderador

    Código:
    /********************************************************************************* 
    ** Programa...: upc_folder.p
    ** Author.....: Desconhecido
    ** Descricao..: Criar uma Folder na tela.
    ** Data.......: 22/02/2002 
    ** 
    ** Visite www.4each.com.br 
    ** 
    *********************************************************************************/
    /* Parameter Definitions ****************************************************/
    define input parameter p-ind-event  as character.
    define input parameter p-ind-object as character.
    define input parameter p-wgh-object as handle.
    define input parameter p-wgh-frame  as widget-handle.
    define input parameter p-cod-table  as character.
    define input parameter p-row-table  as rowid.
    
    def var c-objeto as char no-undo.
    
    /* Global Variable Definitions **********************************************/
    define new global shared var h-folder       as handle no-undo.
    define new global shared var h-viewer       as handle no-undo.
    define new global shared var adm-broker-hdl as handle no-undo.
    /* Variable Definitions *****************************************************/
    
    define var c-folder       as character no-undo.
    define var c-objects      as character no-undo.
    define var i-objects      as integer   no-undo.
    define var h-object       as handle    no-undo.
    define var l-record       as logical   no-undo initial no.
    define var l-group-assign as logical   no-undo initial no.
    
    /*****************************************************************************************************/
    
    assign c-objeto   = entry(num-entries(p-wgh-object:file-name, "~/"), p-wgh-object:file-name, "~/").
    
    def new global shared var h-sel   as handle no-undo.
    
    assign c-objeto = entry(num-entries(p-wgh-object:private-data, "~/"), p-wgh-object:private-data, "~/").
    
    /* message "EVENTO"    p-ind-event skip                         */
    /*            "OBJETO"   p-ind-object skip                      */
    /*            "NOME OBJ" c-objeto skip                          */
    /*            "FRAME"    p-wgh-frame skip                       */
    /*            "TABELA"   p-cod-table skip                       */
    /*            "ROWID"    string(p-row-table) view-as alert-box. */
    
    if p-ind-event  = "INITIALIZE" and 
       p-ind-object = "CONTAINER" then do:
        RUN get-link-handle IN adm-broker-hdl (INPUT p-wgh-object,
                                               INPUT "PAGE-SOURCE":U,
                                               OUTPUT c-folder).
        assign h-folder = widget-handle(c-folder) no-error.
        assign h-sel    = p-wgh-object.
    
        if valid-handle(h-folder) then do:
           RUN create-folder-page IN h-folder (INPUT 3, INPUT "Mensagem":U).
           RUN create-folder-label IN h-folder (INPUT 3, INPUT "Mensagem":U).
           
           RUN select-page IN p-wgh-object (INPUT 3).
           
           RUN init-object IN p-wgh-object (INPUT "esvwr/v01es0508c.w":U, /* Nome do Objeto Viewer */
                                            INPUT p-wgh-frame,
                                            INPUT "Layout = ":U,
                                            OUTPUT h-viewer).
           
           RUN set-position IN h-viewer ( 3.5, 6.0).
           
           RUN get-link-handle IN adm-broker-hdl (INPUT p-wgh-object,
                                                  INPUT "CONTAINER-TARGET":U,
                                                  OUTPUT c-objects).
            
           do i-objects = 1 to num-entries(c-objects):
              assign h-object = widget-handle(entry(i-objects, c-objects)).
              if index(h-object:FILE-NAME, "qry") <> 0 and  /* Voce deve verificar se e a query principal */
                 not l-record then do:
                 assign l-record = yes.
                 
                 RUN add-link IN adm-broker-hdl (INPUT h-object,
                                                 INPUT "Record":U,
                                                 INPUT h-viewer).
              end.
           end.
           RUN dispatch IN h-viewer ("initialize":U).
           RUN select-page IN p-wgh-object (INPUT 3).
           RUN select-page IN p-wgh-object (INPUT 1).
        end. 
        
    end.
    
    

    Arquivos Anexados:

  2. muertebr

    muertebr Membro Participativo

    opa...
    consegui cria o folder no pd1001...

    só que ele está trazendo objetos de outra aba.

    oq q ta faltando faze ou como que faz pra traze o folder limpo??

    Estaria precisando colocar alguns campos especificos ou pelo SOP ou por upc mesmo, mais ele não dexa

Compartilhe esta Página