Código: Selecionar todos
aadd(xuser,'Usuários')
aadd(xacao,'Inclusão')
add item {str(oRow:fieldGet(1)),str(oRow:fieldGet(2)),str(oRow:fieldGet(3))} to grid_auditoria of form_auditoria
Moderador: Moderadores

Código: Selecionar todos
aadd(xuser,'Usuários')
aadd(xacao,'Inclusão')
add item {str(oRow:fieldGet(1)),str(oRow:fieldGet(2)),str(oRow:fieldGet(3))} to grid_auditoria of form_auditoria


Código: Selecionar todos
define window form_auditoria;
at 000,000;
width 600;
height 620;
title 'Auditoria (acessos)';
icon 'iconezed';
modal;
nosize;
on init pesquisar()
define grid grid_auditoria
parent form_auditoria
col 000
row 105
width 795
height 430
headers {'Código','Data','Hora','Usuário','Módulo','Ação'}
widths {090,110,100,150,80,80}
fontname 'verdana'
fontsize 010
fontbold .T.
backcolor WHITE
fontcolor {105,105,105}
end grid
end window
form_auditoria.center
form_auditoria.activate
return(nil)
*********************************
static function pesquisar()
...
...
add item {str(oRow:fieldGet(1)),str(oRow:fieldGet(2)),str(oRow:fieldGet(3))} to grid_auditoria of form_auditoria
Código: Selecionar todos
//digamos que a posicao 3 seja a ação, acho que da pra voce fazer assim
add item {str(oRow:fieldGet(1)),str(oRow:fieldGet(2)), RetornaAcao( oRow ) } to grid_auditoria of form_auditoria
STATIC FUNCTION RetornaAcao( oRow )
LOCAL cAcao := ""
IF oRow:fieldGet(3) == 1
cAcao :="blabla"
ELSEIF oRow:fieldGet(3) == 2
cAcao := "x"
ENDIF
RETURN cAcao
