sábado, 10 de junho de 2017

Aula 1176 WinDev Curso ErpAmarildo 033 - Tabela Custo Nivel Abaixo









TABELA CUSTO NIVEL ABAIXO - Video no Youtube Se Gostou clique aqui para dar joinha




help 1

Nessa aula de hoje

Vamos continuar a fazer o codigo da tabela de custo,
agora, revisando o nivel abaixo

In this class today

Let's continue to do the cost table code,
Now by reviewing the level below


En esta clase de hoy

Vamos a seguir haciendo el código de la tabla de coste,
Ahora, revisando el nivel abajo



http://www.windev.com/ts/download/windev22/windev22_063m.htm



Lançamento Curso Iniciante ao Avancado - Windev/Mobile/Webdev 001/... Aula 1133
Criar Analise/Conexao e Tabela de Empresa - Curso 002/... Aula 1140
ErpAmarildo - Menu Principal - Curso 003/... Aula 1145
Menu Ribbon - Menu Principal - Curso 004/... Aula 1146
Botao Empresa - Menu Ribbon - Curso 005/... Aula 1147
Query Empresa - Cadastro Wdl - Curso 006/... Aula 1148
Tabela Empresa - Curso 007 - Aula 1149
Incluir - Botao Incluir Empresa Tabela Codigo - Curso 008 - Aula 1150
Icone Botao de Incluir - Brinde - Curso ErpAmarildo 9/... aula 1151
Icones Novos - Tabela - Curso ErpAmarldo 10/... Aula 1152
Codigos alteracao Tabela Empresa - Curso ErpAmarildo 11/... Aula 1153
Exclusão Codigos - Tabela Empresa - Curso ErpAmarildo 12/... Aula 1154
Procure - TableEnableFilter - Curso ErpAmarildo 13/... Aula 1155
Menu - Empresas - Chamar Wdl - Curso ErpAmarldo 14/... Aula 1156
Analise - Centro Custo - Niveis - Curso ErpAmarildo 15/... Aula 1157
Conexão Hyperfile - Curso ErpAmarildo 16/... Aula 1158
Tabela-Formulario Custos - Curso ErpAmarildo 17... Aula 1159
Menu Erp Custo - Curso ErpAmarildo 18.. Aula 1160
Tabela Seleciona Empresa - Curso Erp 19/... Aula 1162
CODIGO SELECIONA EMPRESA - CURSO ERP 20/... AULA 1163
ERP CHAMA SELECIONA EMPRESA - CURSO ERP 21/... AULA 1164
ERP AJUSTE -APARECER CODIGO E NOME EMPRESA - CURSO ERP22/... AULA 1165
ERP AJUSTE TELA - CURSO ERP23/... AULA 1166
CODIGO JANELA MDI - CURSO ERP 24/... AULA 1167
Conexao Duvida eRP 25/.. AULA 1168
EMPRESA AJUSTANDO - ERP 26/... AULA 1169
Formulario Custo Ajustando erp 27... aula 1170
Tabela Custo Ajustando erp 28 /... AULA 1171
Formulario Custos - Codigos - erp 29/... AULA 1172
x Nao Sair - Curso Erp 30/... AULA 1173
Tabela Custo - 2o Nivel - ERP 31/ AULA 1174
TABELA CUSTO - MESMO NIVEL - CODIGO - ERP32 / AULA 1175
TABELA CUSTO - NIVEL ABAIXO - CODIGO - ERP33/ AULA 1176
TABELA CUSTOS - LANCAMENTOS - CODIGO - ERP34 / AULAS 1177





// incluir nivel abaixo // Include level below // Incluir el nivel abajo
_nivel is int=0
_grupo is boolean=True
_centro_custo is string=""
// vamos primeiro criar 3 variaveis, nivel, grupo e centro custos
// Let's first create 3 variables, level, group and center costs
// Primero crear 3 variables, nivel, grupo y centro de costes
IF TableSelect(TABLE_CUSTOS) = -1 THEN
    // se nao existir nada na tabela
    // If there is nothing in the table
    // Si no hay nada en la tabla
ELSE

END   
_nivel=TABLE_CUSTOS.COL_NIVEL+1
// aqui pego o nivel atual e soma mais 1
// Here I get the current level and add 1 more
// Aquí llego el nivel actual y suma más 1   
_centro_custo=TABLE_CUSTOS.COL_CENTRO_CUSTO
// aqui pego o centro de custo atual ex: 01.001 / ou 01 / etc...
// Here I take the current cost center ex: 01.001 / or 01 / etc ...
// Aquí el centro de coste actual ex: 01.001 / o 01 / etc ...   

// AQUI NESSE PONTO VAMOS APRIMORAR O CODIDO DO NIVEL ABAIXO
// HERE WE WILL APPRIMRIATE THE LEVEL CODE BELOW
// AQUÍ EN ESTE PUNTO VAMOS APRIMORAR EL CODIDO DEL NIVEL ABAJO
n_CONTADOR is int=3
// CRIEI UMA VARIAVEL CHAMADO CONTADOR E COLOQUEI 3 COMO INICIO
// I CREATED A VARIABLE CALLED COUNTER AND COLLECTED 3 HOW TO START
// CRIEI UNA VARIABLE LLAMADO CONTADOR Y COLOQUE 3 COMO INICIO
LOOP
    //AGORA VOU MOVER PARA KA O QUE ESTA NA LINHA 23 ATE LINHA 28, VAMOS TROCAR
    //                     O NUMERO 3 PELO N_CONTADOR
    //NOW I'LL MOVE TO KA WHAT IS ON THE LINE 23 ATE LINE 28, LET'S CHANGE
    //                     NUMBER 3 BY N_CONTADOR
    //AHORA VOY MOVER PARA KA QUÉ ESTA EN LA LÍNEA 23 ATE LÍNEA 28, VAMOS CAMBIAR
    //                     EL NUMERO 3 POR EL N_CONTADOR
    IF _centro_custo[[n_CONTADOR]]="" THEN
        _centro_custo=_centro_custo+".000"
        // se o n_contador posicao estiver em branco entao vou colocar ponto e 3 zeros
        // If the position counter is blank then I will place 3 zeros
        // Si el n_contador de posición está en blanco entonces voy a poner punto y 3 ceros
        BREAK
        // VOU DAR UM BREAK PARA SAIR DO LOOP
        // I WILL GIVE A BREAK TO LEAVE THE LOOP
        // VOY DAR UN BREAK PARA SALIR DEL LOOP
    ELSE // SENAO
         n_CONTADOR+=1
         // ESTAMOS SOMANDO 1 NO CONTADOR
         // WE ARE SOMARING 1 IN THE COUNTER
         // ESTAMOS SOMANDO 1 EN EL CONTADOR    
    END   
END
_centro_custo=StringIncrement(_centro_custo,FromEnd)
// soma 1 no final    exe: 01.000 ficara 01.001 // 01.001 ficara 01.002 / e assim por diante
// Suma 1 al final exe: 01.000 quedara 01.001 // 01.001 quedara 01.002 / y así sucesivamente
// Sum 1 at the end exe: 01,000 will be 01.001 // 01.001 will be 01.002 / and so on   
HReset(CUSTOS)
// reinializa os valores
// Re-validates the values
// Reinializa los valores
Open(WIN_Form_CUSTOS,_nivel,_grupo,_centro_custo)   
// estou abrindo janela, mandando parametros, nivel,grupo e centro de custos
// I'm opening the window, sending parameters, level, group and cost center
// Que se abre ventana, mandando parámetros, nivel, grupo y centro de costos
TableDisplay(TABLE_CUSTOS,taCurrentFirst)
// estou atualizando a tabela
// I'm updating the table
// Estoy actualizando la tabla 




// incluir nivel abaixo // Include level below // Incluir el nivel abajo
// SEM COMENTARIOS
_nivel is int=0
_grupo is boolean=True
_centro_custo is string=""
IF TableSelect(TABLE_CUSTOS) = -1 THEN
ELSE

END   
_nivel=TABLE_CUSTOS.COL_NIVEL+1
_centro_custo=TABLE_CUSTOS.COL_CENTRO_CUSTO
n_CONTADOR is int=3
LOOP
    IF _centro_custo[[n_CONTADOR]]="" THEN
        _centro_custo=_centro_custo+".000"
        BREAK
    ELSE // SENAO
        n_CONTADOR+=1
    END   
END
_centro_custo=StringIncrement(_centro_custo,FromEnd)
HReset(CUSTOS)
Open(WIN_Form_CUSTOS,_nivel,_grupo,_centro_custo)   
TableDisplay(TABLE_CUSTOS,taCurrentFirst)
























sexta-feira, 9 de junho de 2017

Aula 1175 WinDev Curso ErpAmarildo 032 - Tabela Custo Mesmo Nivel









Video no Youtube Se Gostou clique aqui para dar joinha




help1



Vamos continuar a fazer o codigo da tabela de custo,
no mesmo nivel

Let's continue to do the cost table code,
On the same level


Vamos a seguir haciendo el código de la tabla de coste,
En el mismo nivel

 





Lançamento Curso Iniciante ao Avancado - Windev/Mobile/Webdev 001/... Aula 1133
Criar Analise/Conexao e Tabela de Empresa - Curso 002/... Aula 1140
ErpAmarildo - Menu Principal - Curso 003/... Aula 1145
Menu Ribbon - Menu Principal - Curso 004/... Aula 1146
Botao Empresa - Menu Ribbon - Curso 005/... Aula 1147
Query Empresa - Cadastro Wdl - Curso 006/... Aula 1148
Tabela Empresa - Curso 007 - Aula 1149
Incluir - Botao Incluir Empresa Tabela Codigo - Curso 008 - Aula 1150
Icone Botao de Incluir - Brinde - Curso ErpAmarildo 9/... aula 1151
Icones Novos - Tabela - Curso ErpAmarldo 10/... Aula 1152
Codigos alteracao Tabela Empresa - Curso ErpAmarildo 11/... Aula 1153
Exclusão Codigos - Tabela Empresa - Curso ErpAmarildo 12/... Aula 1154
Procure - TableEnableFilter - Curso ErpAmarildo 13/... Aula 1155
Menu - Empresas - Chamar Wdl - Curso ErpAmarldo 14/... Aula 1156
Analise - Centro Custo - Niveis - Curso ErpAmarildo 15/... Aula 1157
Conexão Hyperfile - Curso ErpAmarildo 16/... Aula 1158
Tabela-Formulario Custos - Curso ErpAmarildo 17... Aula 1159
Menu Erp Custo - Curso ErpAmarildo 18.. Aula 1160
Tabela Seleciona Empresa - Curso Erp 19/... Aula 1162
CODIGO SELECIONA EMPRESA - CURSO ERP 20/... AULA 1163
ERP CHAMA SELECIONA EMPRESA - CURSO ERP 21/... AULA 1164
ERP AJUSTE -APARECER CODIGO E NOME EMPRESA - CURSO ERP22/... AULA 1165
ERP AJUSTE TELA - CURSO ERP23/... AULA 1166
CODIGO JANELA MDI - CURSO ERP 24/... AULA 1167
Conexao Duvida eRP 25/.. AULA 1168
EMPRESA AJUSTANDO - ERP 26/... AULA 1169
Formulario Custo Ajustando erp 27... aula 1170
Tabela Custo Ajustando erp 28 /... AULA 1171
Formulario Custos - Codigos - erp 29/... AULA 1172
x Nao Sair - Curso Erp 30/... AULA 1173
Tabela Custo - 2o Nivel - ERP 31/ AULA 1174
TABELA CUSTO - MESMO NIVEL - CODIGO - ERP32 / AULA 1175
TABELA CUSTO - NIVEL ABAIXO - CODIGO - ERP33/ AULA 1176




//incluir_nivel_mesmo()
_nivel is int=0
_grupo is boolean=True
_centro_custo is string=""
// vamos primeiro criar 3 variaveis, nivel, grupo e centro custos
// Let's first create 3 variables, level, group and center costs
// Primero crear 3 variables, nivel, grupo y centro de costes
IF TableSelect(TABLE_CUSTOS) = -1 THEN
    // se nao existir nada na tabela
    // If there is nothing in the table
    // Si no hay nada en la tabla
    _nivel=1
    _centro_custo="01"
    // como é a primeira vez, entao vamos deixar fixo 1 e 01
    // As it is the first time, then we will leave fixed 1 and 01
    // Como es la primera vez, entonces vamos a dejar fijos 1 y 01
ELSE
    _nivel=TABLE_CUSTOS.COL_NIVEL
    // aqui pego o nivel atual
    // Here I take the current level
    // Eu bati aqui ou nível Atual   
   
    _centro_custo=TABLE_CUSTOS.COL_CENTRO_CUSTO
    // VARIAVEL CENTRO DE CUSTOS É IGUAL A TABLE CENTRO DE CUSTOS
    // VARIABLE COST CENTER IS EQUAL TO TABLE COST CENTER
    // VARIABLE CENTRO DE COSTOS ES IGUAL A TABLE CENTRO DE COSTOS
   
    LOOP
         // AQUI ESTOU FAZENDO UM LOOP ATE NAO EXISTIR CENTRO DE CUSTO
         // HERE I AM MAKING A LOOP ATE THERE IS NO COST CENTER
         // AQUÍ ESTOY HACIENDO UN LOOP ATE NO EXISTIR CENTRO DE COSTE
        

        _centro_custo=StringIncrement(_centro_custo,FromEnd) 
        // aqui vou pegar o centro de custo, e somar + 1
        // Here I'll get the cost center, and add + 1
        // Aquí voy a recoger el centro de coste, y sumar + 1
       
        HReadSeekFirst(CUSTOS,chave_idempresa_centrocusto,[gn_retorna_id_empresa_codigo,_centro_custo])
        IF HFound(CUSTOS) THEN
            // ESTOU LENDO A TABELA CUSTO , COM CHAVE COMPOSTA, DE ID EMPRESA E CENTRO DE CUSTOS,
            //             E PERGUNTANDO SE EXISTE
            // I'M READING THE TABLE COST, WITH COMPOSITE KEY, COMPANY ID AND COST CENTER,
            //             AND ASKING IF IT EXISTS
            // ESTOY LENDO LA TABLA COSTO, CON CLAVE COMPUESTA, DE ID EMPRESA Y CENTRO DE COSTOS,
            //             Y PREGUNTANDO SI EXISTE
        ELSE
            // SENAO   
           
            BREAK
            // VOU FINALIZAR O LOOP POIS NAO ENCONTREI ESSE CENTRO DE CUSTOS
            //  WILL FINISH THE LOOP SO I WILL NOT FIND THIS COST CENTER
            // VOY FINALIZAR EL LOOP POIS NO ENCONTRE ES ES CENTRO DE COSTOS
        END       
    END  
   
END
HReset(CUSTOS)
Open(WIN_Form_CUSTOS,_nivel,_grupo,_centro_custo)   
// estou abrindo janela, mandando parametros, nivel,grupo e centro de custos
// I'm opening the window, sending parameters, level, group and cost center
// Que se abre ventana, mandando parámetros, nivel, grupo y centro de costos
TableDisplay(TABLE_CUSTOS,taCurrentFirst)
// estou atualizando a tabela
// I'm updating the table
// Estoy actualizando la tabla 



//incluir_nivel_mesmo()//SEM COMENTARIOS
_nivel is int=0
_grupo is boolean=True
_centro_custo is string=""
IF TableSelect(TABLE_CUSTOS) = -1 THEN
    _nivel=1
    _centro_custo="01"
ELSE
    _nivel=TABLE_CUSTOS.COL_NIVEL
    _centro_custo=TABLE_CUSTOS.COL_CENTRO_CUSTO
    LOOP
        _centro_custo=StringIncrement(_centro_custo,FromEnd) 
        HReadSeekFirst(CUSTOS,chave_idempresa_centrocusto,[gn_retorna_id_empresa_codigo,_centro_custo])
        IF HFound(CUSTOS) THEN
        ELSE
            BREAK
        END       
    END  
   
END
HReset(CUSTOS)
Open(WIN_Form_CUSTOS,_nivel,_grupo,_centro_custo)   
TableDisplay(TABLE_CUSTOS,taCurrentFirst)

























quinta-feira, 8 de junho de 2017

Aula 1174 WinDev Curso 031 Tabela Custo Nivel Abaixo









Video no Youtube Se Gostou clique aqui para dar joinha




HELP1

FONTE





Lançamento Curso Iniciante ao Avancado - Windev/Mobile/Webdev 001/... Aula 1133
Criar Analise/Conexao e Tabela de Empresa - Curso 002/... Aula 1140
ErpAmarildo - Menu Principal - Curso 003/... Aula 1145
Menu Ribbon - Menu Principal - Curso 004/... Aula 1146
Botao Empresa - Menu Ribbon - Curso 005/... Aula 1147
Query Empresa - Cadastro Wdl - Curso 006/... Aula 1148
Tabela Empresa - Curso 007 - Aula 1149
Incluir - Botao Incluir Empresa Tabela Codigo - Curso 008 - Aula 1150
Icone Botao de Incluir - Brinde - Curso ErpAmarildo 9/... aula 1151
Icones Novos - Tabela - Curso ErpAmarldo 10/... Aula 1152
Codigos alteracao Tabela Empresa - Curso ErpAmarildo 11/... Aula 1153
Exclusão Codigos - Tabela Empresa - Curso ErpAmarildo 12/... Aula 1154
Procure - TableEnableFilter - Curso ErpAmarildo 13/... Aula 1155
Menu - Empresas - Chamar Wdl - Curso ErpAmarldo 14/... Aula 1156
Analise - Centro Custo - Niveis - Curso ErpAmarildo 15/... Aula 1157
Conexão Hyperfile - Curso ErpAmarildo 16/... Aula 1158
Tabela-Formulario Custos - Curso ErpAmarildo 17... Aula 1159
Menu Erp Custo - Curso ErpAmarildo 18.. Aula 1160
Tabela Seleciona Empresa - Curso Erp 19/... Aula 1162
CODIGO SELECIONA EMPRESA - CURSO ERP 20/... AULA 1163
ERP CHAMA SELECIONA EMPRESA - CURSO ERP 21/... AULA 1164
ERP AJUSTE -APARECER CODIGO E NOME EMPRESA - CURSO ERP22/... AULA 1165
ERP AJUSTE TELA - CURSO ERP23/... AULA 1166
CODIGO JANELA MDI - CURSO ERP 24/... AULA 1167
Conexao Duvida eRP 25/.. AULA 1168
EMPRESA AJUSTANDO - ERP 26/... AULA 1169
Formulario Custo Ajustando erp 27... aula 1170
Tabela Custo Ajustando erp 28 /... AULA 1171
Formulario Custos - Codigos - erp 29/... AULA 1172
x Nao Sair - Curso Erp 30/... AULA 1173
Tabela Custo - 2o Nivel - ERP 31/ AULA 1174
TABELA CUSTO - MESMO NIVEL - CODIGO - ERP32 / AULA 1175




Boa noite
Vamos continuar tabela de custos, nivel abaixo

good evening
Let's continue cost table, level below


Buenas noches
Vamos a seguir tabla de costos, nivel abajo



























quarta-feira, 7 de junho de 2017

Aula 1173 WinDev Curso 030 Nao Sair X









Video no Youtube Se Gostou clique aqui para dar joinha




help1




Lançamento Curso Iniciante ao Avancado - Windev/Mobile/Webdev 001/... Aula 1133
Criar Analise/Conexao e Tabela de Empresa - Curso 002/... Aula 1140
ErpAmarildo - Menu Principal - Curso 003/... Aula 1145
Menu Ribbon - Menu Principal - Curso 004/... Aula 1146
Botao Empresa - Menu Ribbon - Curso 005/... Aula 1147
Query Empresa - Cadastro Wdl - Curso 006/... Aula 1148
Tabela Empresa - Curso 007 - Aula 1149
Incluir - Botao Incluir Empresa Tabela Codigo - Curso 008 - Aula 1150
Icone Botao de Incluir - Brinde - Curso ErpAmarildo 9/... aula 1151
Icones Novos - Tabela - Curso ErpAmarldo 10/... Aula 1152
Codigos alteracao Tabela Empresa - Curso ErpAmarildo 11/... Aula 1153
Exclusão Codigos - Tabela Empresa - Curso ErpAmarildo 12/... Aula 1154
Procure - TableEnableFilter - Curso ErpAmarildo 13/... Aula 1155
Menu - Empresas - Chamar Wdl - Curso ErpAmarldo 14/... Aula 1156
Analise - Centro Custo - Niveis - Curso ErpAmarildo 15/... Aula 1157
Conexão Hyperfile - Curso ErpAmarildo 16/... Aula 1158
Tabela-Formulario Custos - Curso ErpAmarildo 17... Aula 1159
Menu Erp Custo - Curso ErpAmarildo 18.. Aula 1160
Tabela Seleciona Empresa - Curso Erp 19/... Aula 1162
CODIGO SELECIONA EMPRESA - CURSO ERP 20/... AULA 1163
ERP CHAMA SELECIONA EMPRESA - CURSO ERP 21/... AULA 1164
ERP AJUSTE -APARECER CODIGO E NOME EMPRESA - CURSO ERP22/... AULA 1165
ERP AJUSTE TELA - CURSO ERP23/... AULA 1166
CODIGO JANELA MDI - CURSO ERP 24/... AULA 1167
Conexao Duvida eRP 25/.. AULA 1168
EMPRESA AJUSTANDO - ERP 26/... AULA 1169
Formulario Custo Ajustando erp 27... aula 1170
Tabela Custo Ajustando erp 28 /... AULA 1171
Formulario Custos - Codigos - erp 29/... AULA 1172
x Nao Sair - Curso Erp 30/... AULA 1173
Tabela Custo - 2o Nivel - ERP 31/ AULA 1174



BOA noite
Vou mostrar como nao sair com x, se alguem achar uma solucao melhor,
é so compartilhar.

Good evening
I'll show you how not to leave with x, if someone finds a better solution,
It's just sharing.


Buenas noches
En el caso de que no se encuentre con una x, si alguien encuentra una solución mejor,
Es sólo compartir.





PROCEDURE WIN_Table_CUSTOS()

gb_fechar_janela is boolean=False
// CRIEI UMA VARIAVEL FECHAR JANELA
// I CREATED A VARIABLE CLOSE WINDOW
// CREA UNA VARIABLE CERRAR VENTANA


//closing win_table_custos

IF gb_fechar_janela=True THEN
ELSE
    Info("Nao Sera fechado")
    ReturnToCapture(Btn_New1)
   
END

// ESTOU FAZENDO UMA PERGUNTA, SE FECHAR JANELA ESTIVER TRUE, VAI FECHAR SENAO AVISA E VOLTA
// I AM MAKING A QUESTION, IF CLOSE WINDOW IS TRUE, WILL CLOSE SENAO TURN AND TURN
// ESTOY HACIENDO UNA PREGUNTA, SI CERRAR VENTANA ESTE TRUE, VA CERRAR SENAO AVISA Y VUELT

// click btn_fecha

gb_fechar_janela=True
Close(WIN_Table_CUSTOS)

// ESTOU COLOCANDO FECHAR JANELA IGUAL A TRUE E FECHA A MESMA, AGORA O X NAO VAI MAIS FECHAR
// I'M CLOSING CLOSE WINDOW EQUAL TO TRUE AND DATE TO THE SAME, NOW THE X DOES NOT CLOSE MORE
// Estoy poniendo cierran como VERDADERO y cierra la MISMO, ahora NO X CERRAR




















Teste

Teste
teste