Code: Select all
DEFINE DIALOG oDlgD RESOURCE 3000 TITLE "Controle de Contas a Pagar"
REDEFINE PAGES oPag ID 102 OF oDlgD ;
DIALOGS 3001, 3002
REDEFINE TABS oTabs ID 104 OF oDlgD ;
PROMPT "&Emissão C.C.P. ", "Consulta C.C.P. " ;
ACTION ({oPag:setoption(oTabs:nOption)})
oDlgD:oTop = oTabs
REDEFINE DTPicker oGetCCP.dataccp VAR aGetCCP.dataccp ID 4004 OF oPag:aDialogs[ 1 ] WHEN lDisable
ACTIVATE DIALOG oDlgD CENTERED ON MOVE(oDlgD:Center) ON INIT ( CriaBarTar1( oDlgD,oPag:aDialogs[ 1 ] ,@aGetCCP,oGetCCP ))
dbCloseall()
oDlgD:End()
Release All
SysRefresh()
RETURN(.T.)
////////////////////////////////////////////////////////////////////////////////
STATIC FUNCTION CriaBarTar1( oDlgD,oPag1,aGetCCP,oGetCCP )
////////////////////////////////////////////////////////////////////////////////
LOCAL oBar, oButDlg[11]
DEFINE BUTTONBAR oBar Size 54,46 Of oPag1 3D Top 2007
DEFINE BUTTON oButDlg[1] OF oBar ;
RESOURCE "PRIMEIRO" ;
PROMPT "primeiro" ;
MESSAGE "Primeiro Registro" ;
TOOLTIP "Primeiro Registro" ;
ACTION (Primeiro(@aGetCCP,oGetCCP,@lEOF,@lBOF,oPag:aDialogs[ 1 ]),oPag:aDialogs[ 1 ]:Update(),oPag:aDialogs[ 1 ]:aEvalWhen(),oDlgD:Update()) WHEN lBotao .AND. lEOF
oBar:bRClicked := { || nil }
RETURN(.T.)
////////////////////////////////////////////////////////////////////////////////
STATIC FUNCTION Primeiro(aGetCCP,oGetCCP,lEOF,lBOF,oPag1)
////////////////////////////////////////////////////////////////////////////////
Select CCP
Set ORDE TO 1
//
lEOF := .T.
lBOF := .T.
//
GO TOP
aGetCCP := InitData()
//
lEOF := .F.
//
RefreshObj(aGetCCP,oGetCCP)
//
RETURN(.T.)
////////////////////////////////////////////////////////////////////////////////