ayuda los codigos estan correctos
Publicado por Paulina Mascorro Chapa (3 intervenciones) el 27/10/2008 19:28:49
BOTON NUEVO:
DO CASE
CASE This.Caption="<Nuevo"
ThisForm.Inicio.enabled=.f.
ThisForm.Anterior.enabled=.f.
ThisForm.Siguiente.enabled=.f.
ThisForm.Ultimo.enabled=.f.
ThisForm.Recupera.enabled=.f.
ThisForm.Cambio.enabled=.f.
ThisForm.Hojear.enabled=.f.
ThisForm.Salir.enabled=.f.
ThisForm.SetAll("ReadOnly",.F.,"TEXTBOX").
This.Caption="<Alt"
*/This.Picture="a: ombre de la figura del botón agregar.bmp"
This.ToolTipTex="agregar el registro actual a la tabla."
This.parent.baja.Caption="<Can"
*/This parent.baja.picture="a: ombre de la figura del botón cancelar.bmp"
This.parent.baja.ToolTipTex="cancelar la entrada de datos."
Append Blank
CASE this.Caption="<Alt"
=TABLEUPDATE(.T.)
Append Blank
OTHERWISE
=MESSAGEBOX("Es un ejemplo",16)
ENDCASE
THISFORM.REFRESH
BOTON BAJA:
CASE This.Caption="<Baja"
DELETE
ThisForm.Recupera.enabled=.t.
=Messagebox("registro eliminado logicamente"+chr(13)+"Usar el botón de recuperar para activarlo",16)
CASE This.Caption="<Can"
TABLEREVERT(.T.)
ThisForm.Inicio.enabled=.T.
ThisForm.Inicio.enabled=.T.
ThisForm.Siguiente.enabled=.T.
ThisForm.ultimo.enabled=.T.
ThisForm.Recupera.enabled=.T.
ThisForm.Cambio.enabled=.T.
ThisForm.Hojear.enabled=.T.
ThisForm.Salir.enabled=.T.
ThisForm.SetAll("ReadOnly",.T.,"TEXTBOX")
ThisForm.Nuevo.Caption="<Nuevo"
ThisForm.Nuevo.ToolTipText="Nuevo"
ThisForm.Nuevo.ToolTipText="Nuevo"
This.Caption="<Baja"
This.Picture="a: ombre de la figura del botón agregar.bmp"
This.ToolTipTex="Baja"
GO BOTTOM
If deleted()
ThisForm.Recupera.enabled=.t.
=messagebox("registro eliminado logicamente"+chr(13)+"Usar el boton Recuperar para activarlo",16)
Else
ThisForm.Recupera.enabled=.t.
Endif
THISFORM.REFRESH
CASE This.Caption="<no"
TABLEREVERT(.T.)
ThisForm.Inicio.enabled=.T.
ThisForm.Anterior.enabled=.T.
ThisForm.Siguiente.enabled=.T.
ThisForm.Ultimo.enabled=.T.
ThisForm.Nuevo.enabled=.T.
ThisForm.Recupera.enabled=.T.
ThisForm.Hojear.enabled=.T.
ThisForm.Salir.enabled=.T.
This.Caption="<Baja"
This.ToolTipTex="Baja"
ThisForm.Cambio.Caption="<Cambio"
ThisForm.Cambio.picture="A: ombre de la figura del botón decambio"
ThisForm.Cambio.ToolTipTex="Cambio"
if deleted()
ThisForm.Recupera.enabled=.t.
=messagebox("registro eliminado Logicamente"+chr(13)+"Usar el boton Recuperar para activarlo",16)
Else
ThisForm.Recupera.enabled=.f.
Endif
ThisForm.SetAll("ReadOnly",.T.,"TEXBOX")
ThisForm.Refresh
OTHERWISE
=MESSAGEBOX("Es un ejemplo",16)
ENDCASE
BOTON CAMBIO:
DO CASE
CASE This.Caption.enabled=.F.
ThisForm.Inicio.enabled=.F.
ThisForm.Anterior.enabled=.f.
ThisForm.Siguiente.enabled=.F.
ThisForm.ultimo.enabled=.F.
ThisForm.Nuevo.enabled=.F.
ThisForm.Recupera.enabled=.F.
ThisForm.Hojear.enabled=.F.
ThisForm.Salir.enabled=.F.
ThisForm.Baja.Caption="<No"
ThisForm.Baja.ToolTipText="No actualizar registro"
ThisCaption="<Mod"
This.Picture="a:figura de modificar"
This.ToolTipTex="Modifica la información de la tabla"
ThisForm.SetAll("ReadOnly",.F.,"TEXTBOX")
CASE This.Caption="Mod"
TABLEUPDATE(.T.)
ThisForm.Inicio.enabled=.T.
ThisForm.Anterior.enabled=.T.
ThisForm.Siguiente.enabled=.T.
ThisForm.Ultimo.enabled=.T.
ThisForm.Nuevo.enabled=.T.
ThisForm.Recupera.enabled=.T.
ThisForm.Hojear.enabled=.T.
ThisForm.Salir.enabled=.T.
ThisForm.Baja.Caption="<Baja"
ThisForm.Baja.ToolTipTex="Baja"
This.aption="<Cambio"
This.picture="a:figura de cambio"
ThisForm.Cambio.ToolTipTex="Cambio"
if deleted()
ThisForm.Recupera.enabled=.t.
=messagebox("registro eliminado Logicamente"+chr(13)+"Usar el boton Recuperar para activarlo",16)
ThisForm.Recupera.enabled=.f.
Endif
ThisForm.SetAll("ReadOnly",.T.,"TEXBOX")
OTHERWISE
=MESSAGEBOX("Es un ejemplo",16)
ENDCASE
Thisform.Refresh
DO CASE
CASE This.Caption="<Nuevo"
ThisForm.Inicio.enabled=.f.
ThisForm.Anterior.enabled=.f.
ThisForm.Siguiente.enabled=.f.
ThisForm.Ultimo.enabled=.f.
ThisForm.Recupera.enabled=.f.
ThisForm.Cambio.enabled=.f.
ThisForm.Hojear.enabled=.f.
ThisForm.Salir.enabled=.f.
ThisForm.SetAll("ReadOnly",.F.,"TEXTBOX").
This.Caption="<Alt"
*/This.Picture="a: ombre de la figura del botón agregar.bmp"
This.ToolTipTex="agregar el registro actual a la tabla."
This.parent.baja.Caption="<Can"
*/This parent.baja.picture="a: ombre de la figura del botón cancelar.bmp"
This.parent.baja.ToolTipTex="cancelar la entrada de datos."
Append Blank
CASE this.Caption="<Alt"
=TABLEUPDATE(.T.)
Append Blank
OTHERWISE
=MESSAGEBOX("Es un ejemplo",16)
ENDCASE
THISFORM.REFRESH
BOTON BAJA:
CASE This.Caption="<Baja"
DELETE
ThisForm.Recupera.enabled=.t.
=Messagebox("registro eliminado logicamente"+chr(13)+"Usar el botón de recuperar para activarlo",16)
CASE This.Caption="<Can"
TABLEREVERT(.T.)
ThisForm.Inicio.enabled=.T.
ThisForm.Inicio.enabled=.T.
ThisForm.Siguiente.enabled=.T.
ThisForm.ultimo.enabled=.T.
ThisForm.Recupera.enabled=.T.
ThisForm.Cambio.enabled=.T.
ThisForm.Hojear.enabled=.T.
ThisForm.Salir.enabled=.T.
ThisForm.SetAll("ReadOnly",.T.,"TEXTBOX")
ThisForm.Nuevo.Caption="<Nuevo"
ThisForm.Nuevo.ToolTipText="Nuevo"
ThisForm.Nuevo.ToolTipText="Nuevo"
This.Caption="<Baja"
This.Picture="a: ombre de la figura del botón agregar.bmp"
This.ToolTipTex="Baja"
GO BOTTOM
If deleted()
ThisForm.Recupera.enabled=.t.
=messagebox("registro eliminado logicamente"+chr(13)+"Usar el boton Recuperar para activarlo",16)
Else
ThisForm.Recupera.enabled=.t.
Endif
THISFORM.REFRESH
CASE This.Caption="<no"
TABLEREVERT(.T.)
ThisForm.Inicio.enabled=.T.
ThisForm.Anterior.enabled=.T.
ThisForm.Siguiente.enabled=.T.
ThisForm.Ultimo.enabled=.T.
ThisForm.Nuevo.enabled=.T.
ThisForm.Recupera.enabled=.T.
ThisForm.Hojear.enabled=.T.
ThisForm.Salir.enabled=.T.
This.Caption="<Baja"
This.ToolTipTex="Baja"
ThisForm.Cambio.Caption="<Cambio"
ThisForm.Cambio.picture="A: ombre de la figura del botón decambio"
ThisForm.Cambio.ToolTipTex="Cambio"
if deleted()
ThisForm.Recupera.enabled=.t.
=messagebox("registro eliminado Logicamente"+chr(13)+"Usar el boton Recuperar para activarlo",16)
Else
ThisForm.Recupera.enabled=.f.
Endif
ThisForm.SetAll("ReadOnly",.T.,"TEXBOX")
ThisForm.Refresh
OTHERWISE
=MESSAGEBOX("Es un ejemplo",16)
ENDCASE
BOTON CAMBIO:
DO CASE
CASE This.Caption.enabled=.F.
ThisForm.Inicio.enabled=.F.
ThisForm.Anterior.enabled=.f.
ThisForm.Siguiente.enabled=.F.
ThisForm.ultimo.enabled=.F.
ThisForm.Nuevo.enabled=.F.
ThisForm.Recupera.enabled=.F.
ThisForm.Hojear.enabled=.F.
ThisForm.Salir.enabled=.F.
ThisForm.Baja.Caption="<No"
ThisForm.Baja.ToolTipText="No actualizar registro"
ThisCaption="<Mod"
This.Picture="a:figura de modificar"
This.ToolTipTex="Modifica la información de la tabla"
ThisForm.SetAll("ReadOnly",.F.,"TEXTBOX")
CASE This.Caption="Mod"
TABLEUPDATE(.T.)
ThisForm.Inicio.enabled=.T.
ThisForm.Anterior.enabled=.T.
ThisForm.Siguiente.enabled=.T.
ThisForm.Ultimo.enabled=.T.
ThisForm.Nuevo.enabled=.T.
ThisForm.Recupera.enabled=.T.
ThisForm.Hojear.enabled=.T.
ThisForm.Salir.enabled=.T.
ThisForm.Baja.Caption="<Baja"
ThisForm.Baja.ToolTipTex="Baja"
This.aption="<Cambio"
This.picture="a:figura de cambio"
ThisForm.Cambio.ToolTipTex="Cambio"
if deleted()
ThisForm.Recupera.enabled=.t.
=messagebox("registro eliminado Logicamente"+chr(13)+"Usar el boton Recuperar para activarlo",16)
ThisForm.Recupera.enabled=.f.
Endif
ThisForm.SetAll("ReadOnly",.T.,"TEXBOX")
OTHERWISE
=MESSAGEBOX("Es un ejemplo",16)
ENDCASE
Thisform.Refresh
Valora esta pregunta


0