PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 25 → [Video Aulas Amarildo] Aula 1176 WinDev Curso ErpAmarildo 033 - Tabela Custo Nivel Abaixo
[Video Aulas Amarildo] Aula 1176 WinDev Curso ErpAmarildo 033 - Tabela Custo Nivel Abaixo
Débuté par amarildo, 11 juin 2017 03:04 - Aucune réponse
Membre enregistré
535 messages
Popularité : +14 (14 votes)
Posté le 11 juin 2017 - 03:04
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


// 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

// 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)


http://windevdesenvolvimento.blogspot.com.br/2017/06/aula-1176-windev-curso-erpamarildo-033.html