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] Botão excluir habilitar depois de incluir Browse-cad

Discussão em 'EMS , HCM e Totvs 11' iniciado por muertebr, Agosto 31, 2009.

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

    muertebr Membro Participativo

    Ola como faço para o botão excluir ativar logo após ser incluso um registro?

    Código:
    /* _UIB-CODE-BLOCK-END */
    &ANALYZE-RESUME
    &Scoped-define SELF-NAME bt-incluir
    &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL bt-incluir B-table-Win
    ON CHOOSE OF bt-incluir IN FRAME F-Main /* Incluir */
    DO:
        RUN pdp\at0623v2.w (INPUT spawCondicoesPagamento.condicaoPagamentoId).
        {&OPEN-QUERY-{&BROWSE-NAME}}
    END.
    Código:
    /* _UIB-CODE-BLOCK-END */
    &ANALYZE-RESUME
    &Scoped-define SELF-NAME bt-ok
    &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL bt-ok w-window
    ON CHOOSE OF bt-ok IN FRAME F-Main /* OK */
    DO:
        DO TRANSACTION:
            FIND FIRST spawCondicoesxRepresentante EXCLUSIVE-LOCK
                WHERE spawCondicoesxRepresentante.condicaoPagamentoId = condicaoPagamentoId AND
                      spawCondicoesxRepresentante.representanteId = INT(fill-in-5:SCREEN-VALUE) NO-ERROR.
            IF AVAIL spawCondicoesxRepresentante THEN
                MESSAGE "Condição de Pagamento já cadastrada para Representante. "
                    VIEW-AS ALERT-BOX INFO BUTTONS OK.
            ELSE DO:
                CREATE spawCondicoesxRepresentante.
                ASSIGN spawCondicoesxRepresentante.condicaoPagamentoId = condicaoPagamentoId
                       spawCondicoesxRepresentante.representanteId = INT(fill-in-5:SCREEN-VALUE).
            END.
            {&OPEN-QUERY-{&BROWSE-NAME}}
            apply "close":U to this-procedure.
         END.
    END.
    EDIT:
    Consegui de uma forma de input/output, mais acredito que deva existir outra forma ;)
  2. Miguel Silva

    Miguel Silva Sem Pontuação

  3. mcarril

    mcarril Membro Participativo

    Você não teria que dar um ENABLE no botão e em seguida um APPly "choose" no botão ????

    enable btn-x with frame x.
    apply "choose" to btn-x.

    enable = habilita
    disable = desabilita.
Status do Tópico:
Não esta aberto para novas mensagens.

Compartilhe esta Página