PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 25 → Aula 1172 WinDev Curso 029 Formulario Custo
Aula 1172 WinDev Curso 029 Formulario Custo
Débuté par amarildo, 07 juin 2017 04:21 - Aucune réponse
Membre enregistré
535 messages
Popularité : +14 (14 votes)
Posté le 07 juin 2017 - 04:21
BOA noite
Na aula de hoje, vamos comecar a fazer os ajustes
do custo, para fazer automatico os nivels

Good evening
In today's class, we will begin to make adjustments
Of cost, to make automatic levels

Buenas noches
En la clase de hoy, vamos a empezar a hacer los ajustes
Del coste, para hacer automatico los nivels

//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
TableSelectPlus(TABLE_CUSTOS,TABLE_CUSTOS..Occurrence)
// vou posicionar a linha da tabela no ultimo registro
// I will place the row of the table in the last record
// En el último registro,
_centro_custo=StringIncrement(TABLE_CUSTOS.COL_CENTRO_CUSTO,FromBeginning)
// 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
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
TableSelectPlus(TABLE_CUSTOS,TABLE_CUSTOS..Occurrence)
_centro_custo=StringIncrement(TABLE_CUSTOS.COL_CENTRO_CUSTO,FromBeginning)
END
HReset(CUSTOS)
Open(WIN_Form_CUSTOS,_nivel,_grupo,_centro_custo)
TableDisplay(TABLE_CUSTOS,taCurrentFirst)


http://windevdesenvolvimento.blogspot.com.br/2017/06/aula-1172-windev-curso-029-formulario.html