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 - Desabilita Botoes 202

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

  1. fdantas

    fdantas Administrator Moderador

    Código:
    /********************************************************************************* 
    ** Programa...: UPC_Desabilita_Botoes_202
    ** Author.....: Desconhecido
    ** Descricao..: Desabilitar Botäes de Um programa Datasul EMS 2.02
    ** Data.......: 01/06/2978 
    ** 
    ** 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.
    
    
    /* variaveis locais *********************************************************/
    define variable              c-objeto                  as char           no-undo.
    define new global shared var wh-objeto                 as Widget-handle  No-undo.
    define new global shared var adm-broker-hdl            as handle         no-undo.
    define new global shared var h_p-cadsim            as handle         no-undo.
    Define Var xc-objects As Char.
    Define Var xi-objects As Int.
    Define Var xh-objects As Handle.
    
    assign c-objeto   = entry(num-entries(p-wgh-object:file-name, "~/"), p-wgh-object:file-name, "~/").
    
    /* MESSAGE  "upc1     " SKIP                   */
    /*          "EVENTO   " p-ind-event  SKIP      */
    /*          "OBJETO   " p-ind-object SKIP      */
    /*          "NOME OBJ " c-objeto     SKIP      */
    /*          "FRAME    " p-wgh-frame:NAME  SKIP */
    /*          "TABELA   " p-cod-table  SKIP      */
    /*          "ROWID    " STRING(p-row-table)    */
    /*          "---->    " p-wgh-object:FILE-NAME */
    /*          VIEW-AS ALERT-BOX.                 */
    
    
    if  p-ind-event  = "DISPLAY"      And
        p-ind-object = "VIEWER"       And
        c-objeto     = "CD0401-V02.w" And
        Valid-handle(h_p-cadsim)      Then Do:
        Run enable-modifica In h_p-cadsim (input No).
        Run enable-elimina In h_p-cadsim (input No).
        /* Se vc quiser habilitar passe como parƒmetro yes */
    End.
    
    
    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 "CONTAINER-TARGET":U,
                                               OUTPUT xc-objects).
        Do xi-objects = 1 To Num-entries(xc-objects):
            Assign xh-objects = Widget-handle(Entry(xi-objects,xc-objects)).
            if xh-objects:file-name = "panel/p-cadsim.w" Then
               Assign h_p-cadsim = xh-objects.
        End.
    End.
    

    Arquivos Anexados:

Compartilhe esta Página