Este ejemplo esta construido con la version 10.6 de fivewin
This sample is build with fivewin version 10.6
Download samples
se puede usar los campos directamete como variables
can use field like variables
REDEFINE GET oGet[ 1 ] VAR oQry:first ID 4008 OF oDlg UPDATE WHEN( lNew .OR. lMod )
REDEFINE GET oGet[ 2 ] VAR oQry:last ID 4009 OF oDlg UPDATE WHEN( lNew .OR. lMod )
REDEFINE DTPICKER oGet[ 3 ] VAR oQry:hiredate ID 4010 OF oDlg UPDATE WHEN( lNew .OR. lMod )
REDEFINE GET oGet[ 4 ] VAR oQry:street ID 4011 OF oDlg UPDATE WHEN( lNew .OR. lMod )
REDEFINE GET oGet[ 5 ] VAR oQry:city ID 4012 OF oDlg UPDATE WHEN( lNew .OR. lMod )
REDEFINE GET oGet[ 6 ] VAR oQry:state ID 4013 OF oDlg UPDATE WHEN( lNew .OR. lMod )
REDEFINE GET oGet[ 7 ] VAR oQry:salary ID 4014 OF oDlg UPDATE WHEN( lNew .OR. lMod ) PICTURE "999,999,999.99"
REDEFINE CHECKBOX oGet[ 8 ] VAR oQry:married ID 4026 PROMPT "Married";
OF oDlg UPDATE WHEN( lNew .OR. lMod )
asignando accion a los botones
Buttons Action
//new
REDEFINE RBBTN ID 4019 OF oDlg;
ACTION ( lNew := ! ( lMod := ! lMod ),;
oQry:GetBlankRow( .F. ),;
oDlg:Update(),;
oGet[ 1 ]:SetFocus() ) ;
WHEN ! lNew;
GROUPBUTTON FIRST ROUND ROUNDSIZE 2;
BITMAP "..\bitmaps\new2.bmp"
....
//Modify
REDEFINE RBBTN ID 4020 OF oDlg ;
ACTION ( lMod := ! ( lNew := ! lNew ),;
oDlg:Update() );
WHEN ! lMod;
GROUPBUTTON;
BITMAP "..\bitmaps\edit.bmp"
//delete
REDEFINE RBBTN ID 4022 OF oDlg;
ACTION ( If( MsgYesNo( "Do want delete current record" ), ;
( oQry:Delete(), oQry:Refresh(),oDlg:Update() ), ) ) ;
WHEN ( ! lNew .AND. ! lMod );
GROUPBUTTON;
BITMAP "..\bitmaps\delete2.bmp"
No hay comentarios:
Publicar un comentario