PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 25 → Aula 1095 - Windev - Dicas 022/... - Colocar Código Consultar Alterar Cliente e Procura
Aula 1095 - Windev - Dicas 022/... - Colocar Código Consultar Alterar Cliente e Procura
Débuté par amarildo, 17 mar. 2017 09:52 - Aucune réponse
Membre enregistré
535 messages
Popularité : +14 (14 votes)
Posté le 17 mars 2017 - 09:52
Nessa dica de hoje,
vou complementar a aula de ontem
com os códigos

//Botao de Consulta e Alteração
//Query and Change button

STC_nome_cliente=""
// Limpando variavel stc nome cliente
// Clearing variable stc client name
EXTERN WIN_Form_cliente
// Como é uma Wdl , estou usando extern
// As it's a Wdl, I'm using extern
LoadWDL("cadastros.wdl")
// Estou fazendo chamado do programa wdl
// I'm doing called the wdl program
HReadSeekFirst(cliente,cliente.id_cliente,EDT_Id_cliente)
// Aqui estou lendo o Cliente,antes de chamar formulario
// Here I am reading the Client, before calling form
IF HFound(cliente) THEN
// Verificando se existe o cliente
// Checking if the customer exists
STC_nome_cliente=cliente.razao_social_nome
Open(WIN_Form_cliente)
// Estou Abrindo o Formulario Para Consultar/Alterar
// I am opening the form to consult / change
END
ReturnToCapture(EDT_Id_cliente)
//Depois de sair do formulario voltar para campo edt id cliente
//After exiting the form back to edt id client field

//Procura cliente //Customer demand
EDT_Id_cliente=0
// Limpando o Código id cliente
// Clearing Customer Id Code
EXTERN WIN_Table_cliente
// Como é uma Wdl , estou usando extern
// As it's a Wdl, I'm using extern
LoadWDL("cadastros.wdl")
// Estou fazendo chamado do programa wdl
// I'm doing called the wdl program
n_id_empresa_cliente is int=Open(WIN_Table_cliente,2)
// Estou abrindo a Tabela Table cliente e retornando o id do cliente
// I am opening the Table Table client and returning the client id
HReadSeekFirst(cliente,cliente.id_empresa_cliente,n_id_empresa_cliente)
// Aqui estou lendo o Cliente,depois de retornar o codigo da Tabela de clientes
// Here I am reading the Client, after returning the code of the Table of clients
IF HFound(cliente) THEN
// Verificando se existe o cliente
// Checking if the customer exists
STC_nome_cliente=cliente.razao_social_nome
EDT_Id_cliente=cliente.id_cliente
END
ReturnToCapture(EDT_Id_cliente)
//Depois de selecionar o cliente,voltar para edt id cliente
//After selecting the client, go back to edt id client


http://windevdesenvolvimento.blogspot.com.br/2017/03/aula-1095-windev-dicas-022-codigo.html

https://www.youtube.com/watch?v=SAEXRagEAsA