- Code: Select all Expand view
- #include 'fivewin.ch'
#include 'xbrowse.ch'
#include 'tdolphin.ch'
static cHost := "localhost", cUser := "root", cPwd := "", cDB := "test"
FUNCTION Main()
LOCAL oCn, oDlg, oQry, oBrw1, oBot
FWCONNECT oCn HOST cHost USER cUser PASSWORD cPwd DATABASE cDB
oQry := oCn:Query("SELECT * FROM citas WHERE alerta = TRUE AND estado = FALSE AND usuario = 'MARKET'" + ;
" AND fecha = " + ClipValue2Sql(DATE()) + " AND hora <= " + ClipValue2Sql(LEFT(TIME(),5)) )
DEFINE DIALOG oDlg TITLE "Alertas para el dia " + DTOC(DATE()) FROM 09,15 TO 28,135
oDlg:lHelpIcon := .f.
@ 01,080 XBROWSE oBrw1 DATASOURCE oQry SIZE 325,140 OF oDlg PIXEL ;
COLUMNS "id","fecha","hora","horafin","motivo","estado","alerta";
HEADERS "id","Fecha","Hora","Hasta","Motivo","Hecha?","Alerta?";
SIZES 65,65,45,45,250,55,55
oBrw1:aCols[6]:SetCheck(,.t.)
oBrw1:aCols[7]:SetCheck(,.t.)
oBrw1:nFreeze := 7
oBrw1:CreateFromCode()
@01,408 GROUP TO 140,468 PIXEL OF oDlg
@10,423 BUTTON oBot PROMPT "&Salir" OF oDlg SIZE 30,10 ACTION oDlg:End() PIXEL
// Activo el dialog
ACTIVATE DIALOG oDlg CENTER
RETURN nil
Con FW16.06
Con FW11
Mismo codigo, distina presentacion...
Que me esta faltando?