Prueba

Solo disponible en BuenasTareas
  • Páginas : 2 (284 palabras )
  • Descarga(s) : 0
  • Publicado : 4 de marzo de 2011
Leer documento completo
Vista previa del texto
FUNCTION MUESTRAEDIF()
*--
LOCAL oDlg, oBrw, oCol, oBtn, oError
LOCAL oFont, oTitle1
LOCAL cQry, cCodigo := SPACE(05)
LOCAL aCampos := { "codigo", "nombre", "apartamentos" }
*--
TRY
cQry :=TDolphinQry():New( "SELECT * FROM contratos ORDER BY codigo ASC", oApp:oConex )
CATCH oError
MSGSTOP("ERROR EN LA SENTENCIA ",oApp:cSistema)
RETURN( cCodigo )
END
*--
DEFINE FONToFont NAME "TIMES NEW ROMAN" BOLD SIZE 0,22
DEFINE DIALOG oDlg FROM 00,00 TO 24,79 ;
TITLE oApp:cSistema
*--
oBrw := TXBrowse():New( oDlg )
*--
WITH OBJECT oBrw

:SetDolphin( cQry,.T., .T., aCampos )
:nStretchCol := STRETCHCOL_LAST
:nMarqueeStyle := MARQSTYLE_HIGHLROW
:nColDividerStyle := LINESTYLE_BLACK
:lColDividerComplete := .T.:nHeaderHeight := 25
:nTop := 10
:nLeft := 10
:nRight := oDlg:nWidth - 320
:nBottom := oDlg:nHeight - 210
:l2007 := .F.
:lFooter := .T.
:lRecordSelector:= .T.
:bClrStd := {|| IF( cQry:RecNo() % 2 == 0,;
{ CLR_BLACK, CLR_WHITE}, {0, RGB( 226,226,226 ) } ) }
:bKeyDown := {|nKey| IIF( nkey == 13, (cCodigo := cQry:codigo, oDlg:End() ), ) }

END WITH
*--
oBrw:aCols[1]:cHeader := " Código "
oBrw:aCols[1]:bStrData := {|| IIF( cQry:LastRec() > 0, cQry:codigo, SPACE(50) ) }oBrw:aCols[1]:nHeadStrAlign := AL_CENTER
oBrw:aCols[1]:nDataStrAlign := AL_LEFT
*--
oBrw:aCols[2]:cHeader := " Nombre del Edificio ó Torre "
oBrw:aCols[2]:bStrData := {|| IIF(cQry:LastRec() > 0, cQry:nombre, SPACE(50) ) }
oBrw:aCols[2]:nHeadStrAlign := AL_CENTER
oBrw:aCols[2]:nDataStrAlign := AL_LEFT
*--
oBrw:aCols[3]:cHeader := " Apartamentos "
oBrw:aCols[3]:bStrData:= {|| IIF( cQry:LastRec() > 0, STR( cQry:apartamentos ), SPACE(10) ) }
oBrw:aCols[3]:nHeadStrAlign := AL_CENTER
oBrw:aCols[3]:nDataStrAlign := AL_CENTER
*--
oBrw:CreateFromCode()
*--
@...
tracking img