PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
WINDEV 25
→
LOG ANTES E DEPOIS DE UMA TABELA
LOG ANTES E DEPOIS DE UMA TABELA
Started by Boller, Apr., 18 2020 6:05 PM - 2 replies
Connect yourself…
Boller
#1
Registered member
3,651 messages
Popularité : +175 (223 votes)
Posted on April, 18 2020 - 6:05 PM
LOG ANTES E DEPOIS DE UMA TABELA
CRIA UMA CLASSE DEFINIDA DA TABELA +
MT001_CLIENTES
is
C
lass
<
MAPPING
=
T001_CLIENTES
>
// Le code se trouvant entre <MAPPING> et <FIN> est généré automatiquement.
// Il sera effacé et recréé entièrement à chaque génération depuis l'analyse.
<
MAPPING
>
m_n
T001_ID_PESSOA
is
8
-
byte
unsigned
int
<
MAPPING
=
T001_ID_PESSOA
,
unique key
>
m_s
T001_ID_USUARIO
is ANSI string
<
MAPPING
=
T001_ID_USUARIO
>
m_s
T001_NOME
is ANSI string
<
MAPPING
=
T001_NOME
>
m_s
T001_NOME_MAE
is ANSI string
<
MAPPING
=
T001_NOME_MAE
>
m_s
T001_TIPO_PJ_PF
is ANSI string
<
MAPPING
=
T001_TIPO_PJ_PF
>
<
END
>
END
//----------------------------------------------------------
//carga da estrutura antes da alteracao
HFilter
(
T001_CLIENTES
,
T001_CLIENTES.T001_ID_PESSOA
,
gn
ID
)
FileToArray
(
garr_T001_CLIENTES_Antes
,
T001_CLIENTES
,
T001_CLIENTES.T001_ID_PESSOA
)
HDeactivateFilter
(
T001_CLIENTES
)
//carga da estrutura antes da alteracao
//------------------------------------------------------------
Procedure
UI_Log
(
acao
)
//carga da estrutura depois da alteracao
HFilter
(
T001_CLIENTES
,
T001_CLIENTES.T001_ID_PESSOA
,
gn
ID
)
FileToArray
(
garr_T001_CLIENTES_Depois
,
T001_CLIENTES
,
T001_CLIENTES.T001_ID_PESSOA
)
HDeactivateFilter
(
T001_CLIENTES
)
//carga da estrutura depois da alteracao
//diferença
buf
Tabela_antes
is
Buffer
Serialize
(
garr_T001_CLIENTES_Antes
,
buf
Tabela_antes
,
psdJSON
)
buf
Tabela_depois
is
Buffer
Serialize
(
garr_T001_CLIENTES_Depois
,
buf
Tabela_depois
,
psdJSON
)
IF
buf
Tabela_antes
<
>
buf
Tabela_depois
THEN
//Info("diferente")
//Log Colunas
TLOG_TABELAS.TLOG_TABELASID
=
GET_SEQ
(
TLOG_TABELAS
)
TLOG_TABELAS.TLOG_TELA
=
"Cadastro de Clientes"
TLOG_TABELAS.TLOG_ACAO
=
acao
TLOG_TABELAS.TLOG_NOME_TABELA
=
"T001_CLIENTES"
TLOG_TABELAS.TLOG_OLD_VALOR
=
buf
Tabela_antes
TLOG_TABELAS.TLOG_NEW_VALOR
=
buf
Tabela_depois
TLOG_TABELAS.TLOG_DATA_HORA
=
DateSys
(
) +
TimeSys
(
)
TLOG_TABELAS.TLOG_PROFISSIONAL
=
GnUserID
HAdd
(
TLOG_TABELAS
)
ELSE
//Info("igual")
END
--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 99949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.com.br/
Report
0
0
Marco Antonio Machado
#2
Posted on April, 24 2020 - 12:42 PM
Olá Adriano
Podemos implementar a mesma característica usando a estrutura RECORD que é um tipo de variável do Windev.
Muito elegante!
https://help.windev.com/…
Report
0
0
Boller
#3
Registered member
3,651 messages
Popularité : +175 (223 votes)
Posted on April, 27 2020 - 8:20 PM
Blz farei os 2 exemplos no sabado que vem na video aula
--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 99949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.com.br/
Report
0
0
→ Go back to WINDEV 25
WINDEV 25
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text