Debido a que muchos me hab茅is escrito para saber donde ver los ejemplos...
Saludos ![]()
______________________________________________________________________________
Sevilla - Andaluc铆a
Sevilla - Andaluc铆a
Debido a que muchos me hab茅is escrito para saber donde ver los ejemplos...
Saludos ![]()
Hola Manolo,
Te agradecemos si publicas aqui los ejemplos directamente, gracias! ![]()
OK Antonio
C贸mo puedo adjuntar los ejemplos?, Te los env铆o a t铆?
//---------------------------------------------------------------------------//
// AUTOR.....: Manuel Exp贸sito Su谩rez Soft4U 2002-2008 //
// e-Mail....: messoft@gmail.com //
// CLASE.....: TMyTable //
// FECHA MOD.: 15/05/2008 //
// VERSION...: v5.05 //
// PROPOSITO.: Ejemplo uso Egle1 + FW con Browse de FW //
//---------------------------------------------------------------------------//
#include "Eagle1.ch"
#include "FiveWin.ch"
//---------------------------------------------------------------------------//
// Son estaticas para que sean visibles desde todo el PRG un poco por
// comodidad
static oConnect // Objeto conexion
static oDS // Objeto DataSet
static oWnd // Objetos de FWH
//---------------------------------------------------------------------------//
function main()
local oBrush
SET DATE FORMAT TO "DD/MM/YYYY"
if AbrirTodo()
DEFINE BRUSH oBrush STYLE BORLAND
DEFINE WINDOW oWnd FROM 4, 4 TO 40, 120 ;
TITLE "Ejemplo de manteniento de una tabla con Eagle1 y FWH" ;
MENU BuildMenu() ;
BRUSH oBrush
SET MESSAGE OF oWnd;
TO oDS:cVersion + " por " + oDS:cAuthor CLOCK DATE
ACTIVATE WINDOW oWnd
else
Salir()
endif
return( nil )
//----------------------------------------------------------------------------//
function BuildMenu()
local oMenu
MENU oMenu
MENUITEM "&Mantenimiento" ACTION Mantenimiento()
MENUITEM "&Utilities"
MENU
MENUITEM "&Calculadora" ACTION WinExec( "Calc" ) ;
MESSAGE "Lamando a la calculadora de Windows"
SEPARATOR
MENUITEM "&Escribir" ACTION WinExec( "Write" ) ;
MESSAGE "Llamando a Write de Windows"
ENDMENU
MENUITEM "&Salir"
MENU
MENUITEM "&Acerca de..." ;
ACTION MsgAbout( oDS:cAuthor, oDS:cVersion ) ;
MESSAGE "Informa sobre la versi贸n de Eagle1"
SEPARATOR
MENUITEM "&Salir";
ACTION Salir();
MESSAGE "Salir del ejemplo de Eagle1 y FWH"
ENDMENU
ENDMENU
return oMenu
//----------------------------------------------------------------------------//
//
static function AbrirTodo()
local cHost := "127.0.0.1"
local cUser := "root"
local cPassword := "root"
local cDbName := "E1Prueba"
local cTabla := "Test"
local lRet
// Creamos el objeto "connexion"
oConnect := TMSConnect():New()
// Nos conectamos al servidor
lRet := oConnect:Connect( cHost, cUser, cPassword, cDbName )
if !lRet
MsgInfo( "No hay conexion con el servidor", "Operaci贸n Cancelada" )
else
oDS := TMyTable():New( oConnect, cTabla )
oDS:SetReadPADAll( .t. )
// Abrimos la tabla, traemos el resultado a nuestro cliente
lRet := oDS:Open()
if !lRet
MsgInfo( "No se puede abrir la tabla: " + cTabla, "Operaci贸n Cancelada" )
endif
endif
return( lRet )
//----------------------------------------------------------------------------//
//
static procedure Salir()
if ValType( oDS ) == "O"
oDS:Free()
endif
if ValType( oConnect ) == "O"
oConnect:Free()
endif
if ValType( oWnd ) == "O"
oWnd:End()
endif
return
//----------------------------------------------------------------------------//
static procedure Mantenimiento()
local oDlg, oLbx
DEFINE DIALOG oDlg FROM 3, 3 TO 40, 100 TITLE "Mantenimiento tabla TEST"
@ 00, 01 SAY " &Datos tabla..." OF oDlg
@ 01,01 LISTBOX oLbx ;
FIELDS ;
PadL( oDS:FieldGet( 1 ), 6, " " ),;
oDS:FieldGet( 02 ), ;
oDS:FieldGet( 03 ), ;
oDS:FieldGet( 04 ), ;
oDS:FieldGet( 05 ), ;
oDS:FieldGet( 06 ), ;
oDS:FieldGet( 07 ), ;
oDS:FieldGet( 09 ), ;
oDS:FieldGet( 08 ) ;
HEADERS ;
oDS:FieldName( 01 ), ;
oDS:FieldName( 02 ), ;
oDS:FieldName( 03 ), ;
oDS:FieldName( 04 ), ;
oDS:FieldName( 05 ), ;
oDS:FieldName( 06 ), ;
oDS:FieldName( 07 ), ;
oDS:FieldName( 09 ), ;
oDS:FieldName( 08 ) ;
SIZE 365, 220 OF oDlg
MySetBrowse( oLbx, oDS ) // Asigna los codeBlock de movimiento
oLbx:cAlias := "ARRAY" // Para que el gestor de listados no de error
oLbx:lCellStyle := .t.
@ 14, 01 BUTTON "&A帽adir" OF oDlg SIZE 35, 12;
ACTION CtrDatos( oLbx, .t. )
@ 14, 08 BUTTON "&Modificar" OF oDlg SIZE 35, 12;
ACTION CtrDatos( oLbx, .f. )
@ 14, 15 BUTTON "&Borrar" OF oDlg SIZE 35, 12;
ACTION Borrar( oLbx )
@ 14, 22 BUTTON "&Ordenar" OF oDlg SIZE 35, 12;
ACTION Ordernar( oLbx )
@ 14, 29 BUTTON "B&uscar" OF oDlg SIZE 35, 12;
ACTION Buscar( oLbx )
@ 14, 36 BUTTON "Listar" OF oDlg SIZE 35, 12;
ACTION ( oLbx:Report( "Listado de la tabla", .t. ), oDS:GoTop() )
@ 14, 57 BUTTON "&Salir" OF oDlg ;
ACTION oDlg:End() SIZE 35, 12
ACTIVATE DIALOG oDlg CENTERED
return
//----------------------------------------------------------------------------//
// Borra la fila actual
static procedure Borrar( oBrw )
local nRecNo := oDS:RecNo()
if MsgYesNo( "Realmente quiere borrar el registro " + StrNum( oDS:RecNo() ) + "?" )
if oDS:Delete( , 1 )
MyMsgInfo( "Borrado en el servidor" )
if MsgYesNo( "Refresca la lista?" )
oDS:Refresh()
oDS:GoTo( nRecNo )
oBrw:Refresh()
endif
endif
else
MyMsgInfo( "No se ha borrado..." )
endif
return
//----------------------------------------------------------------------------//
// Establece un nuevo orden de visualizacion
static procedure Ordernar( oLbxPrincipal )
local oDlg, oLbx
local i := oDS:FieldCount()
local aFld := Array( i )
local n, cValue
FOR n := 1 TO i
aFld[ n ] := oDS:FieldName( n )
NEXT
n := 0
DEFINE DIALOG oDlg FROM 2, 2 TO 18, 30;
TITLE "Eagle1, FW y ListBox" ;
STYLE nOr( DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, 4 )
@ 1, 02 LISTBOX oLbx;
VAR cValue;
ITEMS aFld;
SIZE 80, 70;
OF oDlg
@ 5, 02 BUTTON "&Seleccionar";
OF oDlg;
SIZE 40, 12;
DEFAULT;
ACTION ( MyMsgInfo( "Orden: " + Str( n := oLbx:GetPos() ) + ;
+ CRLF + "Nombre del campo: " + cValue, "Has elegido" ), ;
oDlg:End() )
@ 5, 10 BUTTON "&Salir";
OF oDlg;
SIZE 40, 12;
ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED
if n != 0 .and. oDS:SetOrder( n )
oLbxPrincipal:GoTop()
oLbxPrincipal:Refresh()
else
MyMsgInfo( "No se ha establacido otro orden..." )
endif
return
//----------------------------------------------------------------------------//
static procedure Buscar( oLb )
local oDlg
local i := oDS:FieldCount()
local n := 1
local oSay, cSay := "&Valor campo "
local oGet, uVal
DEFINE DIALOG oDlg FROM 2, 2 TO 12, 70;
TITLE "B煤squeda de valores en el DataSet" ;
STYLE nOr( DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, 4 )
@ 01, 01 SAY "&Numero de columna ( 1 - " + StrNum( i ) + " ):" OF oDlg
@ 01, 10 GET n PICTURE "999" ;
VALID ( uVal := oDS:FieldGet( n ), oGet:Refresh(), ;
oSay:SetText( cSay + oDS:FieldName( n ) ), n > 0 .and. n <= i ) ;
OF oDlg
@ 02, 01 SAY oSay VAR cSay OF oDlg
@ 02, 10 GET oGet VAR uVal SIZE 160, 13 OF oDlg
@ 3, 02 BUTTON "&Buscar";
OF oDlg;
SIZE 40, 12;
ACTION ( if( oDS:Find( n, uVal, .t. ), ;
MyMsgInfo( "Valor encontrado" ), ;
MyMsgInfo( "Valor no encontrado" ) ), oLb:Refresh() )
@ 3, 10 BUTTON "S&iguiente";
OF oDlg;
SIZE 40, 12;
ACTION ( if( !oDS:FindNext(), MyMsgInfo( "No hay m谩s. Se lleg贸 al final" ), ), ;
oLb:Refresh() )
@ 3, 18 BUTTON "&Salir";
OF oDlg;
SIZE 40, 12;
ACTION oDlg:End()
ACTIVATE DIALOG oDlg
return
//----------------------------------------------------------------------------//
static procedure CtrDatos( oLb, lNuevo )
local oDlg
local cQueHago
if lNuevo
cQueHago := "Altas"
oDS:Blank()
else
cQueHago := "Modificaci贸n"
oDS:Load()
endif
DEFINE DIALOG oDlg FROM 2, 2 TO 30, 80;
TITLE "Mantenimiento de la tabla Test - " + cQueHago;
STYLE nOr( DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, 4 )
@ 01, 01 SAY "First" OF oDlg
@ 01, 05 GET oDS:First PICTURE "@K" UPDATE OF oDlg
@ 1.8, 01 SAY "Last" OF oDlg
@ 02, 05 GET oDS:Last PICTURE "@K" UPDATE OF oDlg
@ 2.6, 01 SAY "Street" OF oDlg
@ 03, 05 GET oDS:Street PICTURE "@K" UPDATE OF oDlg
@ 3.5, 01 SAY "City" OF oDlg
@ 04, 05 GET oDS:City PICTURE "@K" UPDATE OF oDlg
@ 4.4, 01 SAY "State" OF oDlg
@ 05, 05 GET oDS:State PICTURE "@K" UPDATE OF oDlg
@ 5.2, 01 SAY "Zip" OF oDlg
@ 06, 05 GET oDS:Zip PICTURE "@K" UPDATE OF oDlg
@ 6.1, 01 SAY "Hiredate" OF oDlg
@ 07, 05 GET oDS:Hiredate PICTURE "@K" UPDATE OF oDlg
@ 7.0, 01 SAY "Married" OF oDlg
@ 08, 05 GET oDS:Married PICTURE "@K" UPDATE OF oDlg
@ 7.9, 01 SAY "Age" OF oDlg
@ 09, 05 GET oDS:Age PICTURE "@K" UPDATE OF oDlg
@ 8.9, 01 SAY "Salary" OF oDlg
@ 10, 05 GET oDS:Salary PICTURE "@K" UPDATE OF oDlg
@ 9.8, 01 SAY "Notes" OF oDlg
@ 11, 05 GET oDS:Notes PICTURE "@K" UPDATE OF oDlg
@ 10, 02 BUTTON "&Vale";
OF oDlg;
SIZE 40, 12;
ACTION ( if( lNuevo, oDS:Insert( .t. ), oDS:Update( .t. ) ), ;
oLb:Refresh(), oDlg:End() )
@ 10, 10 BUTTON "&Cancelar";
OF oDlg;
SIZE 40, 12;
ACTION ( if( lNuevo, oDS:Blank(), oDS:Load() ), oDlg:Update() )
@ 10, 18 BUTTON "&Salir";
OF oDlg;
SIZE 40, 12;
ACTION oDlg:End()
ACTIVATE DIALOG oDlg
return
//----------------------------------------------------------------------------//xmanuel wrote:Aqu铆 os dejo el c贸digo el PRG de un mantenimiento completo de una tabla en MySQL.
Ver谩 que hay altas, modificaciones, bajas, listados, ordenaci贸n y b煤squedas... todo con muy poco c贸digo y una rapidez que reto a cualquiera que la supere con otras libs
Saludos
Perdon muy interesante , alguien tiene el archivo Eagle1.ch me hace falta para hacer la prueba
//---------------------------------------------------------------------------// // AUTOR.....: Manuel Exp贸sito Su谩rez Soft4U 2002-2008 // // e-Mail....: messoft@gmail.com // // CLASE.....: TMyTable // // FECHA MOD.: 15/05/2008 // // VERSION...: v5.05 // // PROPOSITO.: Ejemplo uso Egle1 + FW con Browse de FW // //---------------------------------------------------------------------------// #include "Eagle1.ch" #include "FiveWin.ch" //---------------------------------------------------------------------------// // Son estaticas para que sean visibles desde todo el PRG un poco por // comodidad static oConnect // Objeto conexion static oDS // Objeto DataSet static oWnd // Objetos de FWH //---------------------------------------------------------------------------// function main() local oBrush SET DATE FORMAT TO "DD/MM/YYYY" if AbrirTodo() DEFINE BRUSH oBrush STYLE BORLAND DEFINE WINDOW oWnd FROM 4, 4 TO 40, 120 ; TITLE "Ejemplo de manteniento de una tabla con Eagle1 y FWH" ; MENU BuildMenu() ; BRUSH oBrush SET MESSAGE OF oWnd; TO oDS:cVersion + " por " + oDS:cAuthor CLOCK DATE ACTIVATE WINDOW oWnd else Salir() endif return( nil ) //----------------------------------------------------------------------------// function BuildMenu() local oMenu MENU oMenu MENUITEM "&Mantenimiento" ACTION Mantenimiento() MENUITEM "&Utilities" MENU MENUITEM "&Calculadora" ACTION WinExec( "Calc" ) ; MESSAGE "Lamando a la calculadora de Windows" SEPARATOR MENUITEM "&Escribir" ACTION WinExec( "Write" ) ; MESSAGE "Llamando a Write de Windows" ENDMENU MENUITEM "&Salir" MENU MENUITEM "&Acerca de..." ; ACTION MsgAbout( oDS:cAuthor, oDS:cVersion ) ; MESSAGE "Informa sobre la versi贸n de Eagle1" SEPARATOR MENUITEM "&Salir"; ACTION Salir(); MESSAGE "Salir del ejemplo de Eagle1 y FWH" ENDMENU ENDMENU return oMenu //----------------------------------------------------------------------------// // static function AbrirTodo() local cHost := "127.0.0.1" local cUser := "root" local cPassword := "root" local cDbName := "E1Prueba" local cTabla := "Test" local lRet // Creamos el objeto "connexion" oConnect := TMSConnect():New() // Nos conectamos al servidor lRet := oConnect:Connect( cHost, cUser, cPassword, cDbName ) if !lRet MsgInfo( "No hay conexion con el servidor", "Operaci贸n Cancelada" ) else oDS := TMyTable():New( oConnect, cTabla ) oDS:SetReadPADAll( .t. ) // Abrimos la tabla, traemos el resultado a nuestro cliente lRet := oDS:Open() if !lRet MsgInfo( "No se puede abrir la tabla: " + cTabla, "Operaci贸n Cancelada" ) endif endif return( lRet ) //----------------------------------------------------------------------------// // static procedure Salir() if ValType( oDS ) == "O" oDS:Free() endif if ValType( oConnect ) == "O" oConnect:Free() endif if ValType( oWnd ) == "O" oWnd:End() endif return //----------------------------------------------------------------------------// static procedure Mantenimiento() local oDlg, oLbx DEFINE DIALOG oDlg FROM 3, 3 TO 40, 100 TITLE "Mantenimiento tabla TEST" @ 00, 01 SAY " &Datos tabla..." OF oDlg @ 01,01 LISTBOX oLbx ; FIELDS ; PadL( oDS:FieldGet( 1 ), 6, " " ),; oDS:FieldGet( 02 ), ; oDS:FieldGet( 03 ), ; oDS:FieldGet( 04 ), ; oDS:FieldGet( 05 ), ; oDS:FieldGet( 06 ), ; oDS:FieldGet( 07 ), ; oDS:FieldGet( 09 ), ; oDS:FieldGet( 08 ) ; HEADERS ; oDS:FieldName( 01 ), ; oDS:FieldName( 02 ), ; oDS:FieldName( 03 ), ; oDS:FieldName( 04 ), ; oDS:FieldName( 05 ), ; oDS:FieldName( 06 ), ; oDS:FieldName( 07 ), ; oDS:FieldName( 09 ), ; oDS:FieldName( 08 ) ; SIZE 365, 220 OF oDlg MySetBrowse( oLbx, oDS ) // Asigna los codeBlock de movimiento oLbx:cAlias := "ARRAY" // Para que el gestor de listados no de error oLbx:lCellStyle := .t. @ 14, 01 BUTTON "&A帽adir" OF oDlg SIZE 35, 12; ACTION CtrDatos( oLbx, .t. ) @ 14, 08 BUTTON "&Modificar" OF oDlg SIZE 35, 12; ACTION CtrDatos( oLbx, .f. ) @ 14, 15 BUTTON "&Borrar" OF oDlg SIZE 35, 12; ACTION Borrar( oLbx ) @ 14, 22 BUTTON "&Ordenar" OF oDlg SIZE 35, 12; ACTION Ordernar( oLbx ) @ 14, 29 BUTTON "B&uscar" OF oDlg SIZE 35, 12; ACTION Buscar( oLbx ) @ 14, 36 BUTTON "Listar" OF oDlg SIZE 35, 12; ACTION ( oLbx:Report( "Listado de la tabla", .t. ), oDS:GoTop() ) @ 14, 57 BUTTON "&Salir" OF oDlg ; ACTION oDlg:End() SIZE 35, 12 ACTIVATE DIALOG oDlg CENTERED return //----------------------------------------------------------------------------// // Borra la fila actual static procedure Borrar( oBrw ) local nRecNo := oDS:RecNo() if MsgYesNo( "Realmente quiere borrar el registro " + StrNum( oDS:RecNo() ) + "?" ) if oDS:Delete( , 1 ) MyMsgInfo( "Borrado en el servidor" ) if MsgYesNo( "Refresca la lista?" ) oDS:Refresh() oDS:GoTo( nRecNo ) oBrw:Refresh() endif endif else MyMsgInfo( "No se ha borrado..." ) endif return //----------------------------------------------------------------------------// // Establece un nuevo orden de visualizacion static procedure Ordernar( oLbxPrincipal ) local oDlg, oLbx local i := oDS:FieldCount() local aFld := Array( i ) local n, cValue FOR n := 1 TO i aFld[ n ] := oDS:FieldName( n ) NEXT n := 0 DEFINE DIALOG oDlg FROM 2, 2 TO 18, 30; TITLE "Eagle1, FW y ListBox" ; STYLE nOr( DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, 4 ) @ 1, 02 LISTBOX oLbx; VAR cValue; ITEMS aFld; SIZE 80, 70; OF oDlg @ 5, 02 BUTTON "&Seleccionar"; OF oDlg; SIZE 40, 12; DEFAULT; ACTION ( MyMsgInfo( "Orden: " + Str( n := oLbx:GetPos() ) + ; + CRLF + "Nombre del campo: " + cValue, "Has elegido" ), ; oDlg:End() ) @ 5, 10 BUTTON "&Salir"; OF oDlg; SIZE 40, 12; ACTION oDlg:End() ACTIVATE DIALOG oDlg CENTERED if n != 0 .and. oDS:SetOrder( n ) oLbxPrincipal:GoTop() oLbxPrincipal:Refresh() else MyMsgInfo( "No se ha establacido otro orden..." ) endif return //----------------------------------------------------------------------------// static procedure Buscar( oLb ) local oDlg local i := oDS:FieldCount() local n := 1 local oSay, cSay := "&Valor campo " local oGet, uVal DEFINE DIALOG oDlg FROM 2, 2 TO 12, 70; TITLE "B煤squeda de valores en el DataSet" ; STYLE nOr( DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, 4 ) @ 01, 01 SAY "&Numero de columna ( 1 - " + StrNum( i ) + " ):" OF oDlg @ 01, 10 GET n PICTURE "999" ; VALID ( uVal := oDS:FieldGet( n ), oGet:Refresh(), ; oSay:SetText( cSay + oDS:FieldName( n ) ), n > 0 .and. n <= i ) ; OF oDlg @ 02, 01 SAY oSay VAR cSay OF oDlg @ 02, 10 GET oGet VAR uVal SIZE 160, 13 OF oDlg @ 3, 02 BUTTON "&Buscar"; OF oDlg; SIZE 40, 12; ACTION ( if( oDS:Find( n, uVal, .t. ), ; MyMsgInfo( "Valor encontrado" ), ; MyMsgInfo( "Valor no encontrado" ) ), oLb:Refresh() ) @ 3, 10 BUTTON "S&iguiente"; OF oDlg; SIZE 40, 12; ACTION ( if( !oDS:FindNext(), MyMsgInfo( "No hay m谩s. Se lleg贸 al final" ), ), ; oLb:Refresh() ) @ 3, 18 BUTTON "&Salir"; OF oDlg; SIZE 40, 12; ACTION oDlg:End() ACTIVATE DIALOG oDlg return //----------------------------------------------------------------------------// static procedure CtrDatos( oLb, lNuevo ) local oDlg local cQueHago if lNuevo cQueHago := "Altas" oDS:Blank() else cQueHago := "Modificaci贸n" oDS:Load() endif DEFINE DIALOG oDlg FROM 2, 2 TO 30, 80; TITLE "Mantenimiento de la tabla Test - " + cQueHago; STYLE nOr( DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, 4 ) @ 01, 01 SAY "First" OF oDlg @ 01, 05 GET oDS:First PICTURE "@K" UPDATE OF oDlg @ 1.8, 01 SAY "Last" OF oDlg @ 02, 05 GET oDS:Last PICTURE "@K" UPDATE OF oDlg @ 2.6, 01 SAY "Street" OF oDlg @ 03, 05 GET oDS:Street PICTURE "@K" UPDATE OF oDlg @ 3.5, 01 SAY "City" OF oDlg @ 04, 05 GET oDS:City PICTURE "@K" UPDATE OF oDlg @ 4.4, 01 SAY "State" OF oDlg @ 05, 05 GET oDS:State PICTURE "@K" UPDATE OF oDlg @ 5.2, 01 SAY "Zip" OF oDlg @ 06, 05 GET oDS:Zip PICTURE "@K" UPDATE OF oDlg @ 6.1, 01 SAY "Hiredate" OF oDlg @ 07, 05 GET oDS:Hiredate PICTURE "@K" UPDATE OF oDlg @ 7.0, 01 SAY "Married" OF oDlg @ 08, 05 GET oDS:Married PICTURE "@K" UPDATE OF oDlg @ 7.9, 01 SAY "Age" OF oDlg @ 09, 05 GET oDS:Age PICTURE "@K" UPDATE OF oDlg @ 8.9, 01 SAY "Salary" OF oDlg @ 10, 05 GET oDS:Salary PICTURE "@K" UPDATE OF oDlg @ 9.8, 01 SAY "Notes" OF oDlg @ 11, 05 GET oDS:Notes PICTURE "@K" UPDATE OF oDlg @ 10, 02 BUTTON "&Vale"; OF oDlg; SIZE 40, 12; ACTION ( if( lNuevo, oDS:Insert( .t. ), oDS:Update( .t. ) ), ; oLb:Refresh(), oDlg:End() ) @ 10, 10 BUTTON "&Cancelar"; OF oDlg; SIZE 40, 12; ACTION ( if( lNuevo, oDS:Blank(), oDS:Load() ), oDlg:Update() ) @ 10, 18 BUTTON "&Salir"; OF oDlg; SIZE 40, 12; ACTION oDlg:End() ACTIVATE DIALOG oDlg return //----------------------------------------------------------------------------//