PC SOFT

GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEVWEBDEV e WINDEV Mobile

Inicio → WINDEV 25 → WD21 - como atualizar registro na tela a partir de outra tela?
WD21 - como atualizar registro na tela a partir de outra tela?
Iniciado por Mister ANDRE MARTINI, out., 20 2016 5:35 PM - 5 respostas
Membro registado
208 mensagems
Popularité : +25 (25 votes)
Publicado em outubro, 20 2016 - 5:35 PM
Olá pessoal,

tenho um formulário de contas a pagar com diversos campos, entre eles VALOR PAGO e SALDO, neste formulário tenho uma TABLE referente a tabela pagamentos_do_cpa, para incluir pagamentos nesta TABLE/file tenho um outro formulário, meu problema é saber como atualizar os EDTs VALOR PAGO e SALDO depois de incluir/alterar um pagamento no outro formulário.

Obs.: no arquivo eu consigo atualizar, mas na tela (edt) não, tentei o filetoscreen() mas não atualizou

--
André Martini
IS2 Automotive http://www.is2.inf.br/is2automotive/index.html
IS2 Construtive http://www.is2.inf.br/is2construtive/index.html
IS2 Store http://www.is2.inf.br/is2store/index.html
IS2 Gerent http://www.is2.inf.br/is2gerent/index.html
Membro registado
3.659 mensagems
Popularité : +175 (223 votes)
Publicado em outubro, 20 2016 - 6:09 PM
Andre,

faz assim...

na janela filha coloque o nome da janela mae e o nome do controle que quer atualizar

como é uma table seria mais ou menos assim:

tabledisplay(win_janelamae.controletabledesejado, tareexecutequery)

tabledisplay(win_janelamae.controletabledesejado, tainit)

isso estando na janela filha

só isso, só colocar o caminho completo, simples assim!

ok

--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 9949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.com.br/
Membro registado
208 mensagems
Popularité : +25 (25 votes)
Publicado em outubro, 20 2016 - 7:19 PM
não é a table o problema (a table eu consigo dar o refresh tranquilo conforme mostrou acima), eu preciso atualizar um EDT (vinculado a um campo do arquivo) do formulário a partir de outro formulário

--
André Martini
IS2 Automotive http://www.is2.inf.br/is2automotive/index.html
IS2 Construtive http://www.is2.inf.br/is2construtive/index.html
IS2 Store http://www.is2.inf.br/is2store/index.html
IS2 Gerent http://www.is2.inf.br/is2gerent/index.html
Membro registado
208 mensagems
Popularité : +25 (25 votes)
Publicado em outubro, 20 2016 - 7:53 PM
Resolvido, primeiro preciso dar um HReadSeekFirst e depois um FileToScreen

Conforme documento o FileToScreen le o arquivo, apenas pega da memória, se houve alteração do arquivo tem que recarregar na memória com o uns dos comandos HRead, HReadSeek, HReadFirst
"FileToScreen does not read the data file. The value of the record loaded in memory is used to initialize the controls.
Therefore, a record must be loaded in memory beforehand (HRead, HReadSeek, HReadFirst, ...)."



--
André Martini
IS2 Automotive http://www.is2.inf.br/is2automotive/index.html
IS2 Construtive http://www.is2.inf.br/is2construtive/index.html
IS2 Store http://www.is2.inf.br/is2store/index.html
IS2 Gerent http://www.is2.inf.br/is2gerent/index.html
Membro registado
3.659 mensagems
Popularité : +175 (223 votes)
Publicado em outubro, 20 2016 - 7:54 PM
Boa tarde,

Faz assim na janela filha:

win_janela_mae.edt_campo = valor

Deu certo assim?

É a mesma técnica

ok, André?

--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 9949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.com.br/
Membro registado
208 mensagems
Popularité : +25 (25 votes)
Publicado em outubro, 20 2016 - 8:01 PM
assim:
win_janela_mae.edt_campo = valor

não tinha resolvido para mim, por isso fiz conforme videoaula.

obrigado

--
André Martini
IS2 Automotive http://www.is2.inf.br/is2automotive/index.html
IS2 Construtive http://www.is2.inf.br/is2construtive/index.html
IS2 Store http://www.is2.inf.br/is2store/index.html
IS2 Gerent http://www.is2.inf.br/is2gerent/index.html