No se FoxPro Quien me ayuda!?
Publicado por Carlos Linares (10 intervenciones) el 30/01/2011 22:02:28
Buenas Amig@s,
Buen como les dije yo no se casi nada de foxpro, y en la uni me mandaron a terminar un proyectico que para muchos de uds le es facil. Les explico
Me mandaron hacer 4 text y 4 label
nombre, apellido, direccion y telefono.
4 botones:
Nuevo, Guardar Limpiar y Salir.
ME DIJERON QUE EL NUEVO BOTON QUE DEBO AGREGAR ES EL DE LIMPIAR REGISTROS. LA CUAL NO ME FUNCIONA. COMO HAGO PARA QUE ME FUNCIONES.
DE TODAS MANERAS COLOQUE LOS CODIGOS DE CADA BOTON POR SI HAY OTRA COSA QUE ESTE MALO.
LES RECUERDO QUE NO SE NADA DE FOXPRO. POR SI ES POSIBLE QUE ME EXPLIQUEN PASO POR PASO.. SI NO ES MUCHO ABUSO.. MUCHAS GRACIAS DE VERDAD!!!
Estos son los codigos que yo tengo en cada boton:
En Nuevo:
go bottom
append blank
thisform.txtci_clie.enabled = .T.
thisform.txtnom_clie.enabled = .T.
thisform.txtapel_clie.enabled = .T.
thisform.txtdir_clie.enabled = .T.
thisform.txttlf_clie.enabled = .T.
*Go Bottom
thisform.refresh
*append blank
thisform.txtci_clie.setfocus
thisform.txtci_clie.value = 0
thisform.txtnom_clie.value = ""
thisform.txtapel_clie.value = ""
thisform.txtdir_clie.value = ""
thisform.txttlf_clie.value = 0
thisform.refresh
En Guardar:
replace tcliente.ci_clie with thisform.txtci_clie.value
replace tcliente.nom_clie with thisform.txtnom_clie.value
replace tcliente.apel_clie with thisform.txtapel_clie.value
replace tcliente.dir_clie with thisform.txtdir_clie.value
replace tcliente.tlf_clie with thisform.txttlf_clie.value
thisform.refresh
if empty (thisform.txtnom_clie.value)
messagebox("El Nombre Del Cliente No Está",48,"Error")
thisform.txtnom_clie.setfocus
endif
if empty (thisform.txtapel_clie.value)
messagebox("El Apellido Del Cliente No Está",48,"Error")
thisform.txtapel_clie.setfocus
endif
if empty (thisform.txtci_clie.value)
messagebox("La Cédula Del Cliente No Está",48,"Error")
thisform.txtci_clie.setfocus
endif
if empty (thisform.txtdir_clie.value)
messagebox("La Dirección Del Cliente No Está",48,"Error")
thisform.txtdir_clie.setfocus
endif
if empty (thisform.txttlf_clie.value)
messagebox("El Número Del Cliente No Está",48,"Error")
thisform.txttlf_clie.setfocus
endif
Boton de Salir:
Release thisform
Uno que yo adicione "Eliminar"
thisform.txtci_clie.setfocus
thisform.txtci_clie.value = ""
thisform.txtnom_clie.value = ""
thisform.txtapel_clie.value = ""
thisform.txtdir_clie.value = ""
thisform.txttlf_clie.value = ""
thisform.refresh.
Buen como les dije yo no se casi nada de foxpro, y en la uni me mandaron a terminar un proyectico que para muchos de uds le es facil. Les explico
Me mandaron hacer 4 text y 4 label
nombre, apellido, direccion y telefono.
4 botones:
Nuevo, Guardar Limpiar y Salir.
ME DIJERON QUE EL NUEVO BOTON QUE DEBO AGREGAR ES EL DE LIMPIAR REGISTROS. LA CUAL NO ME FUNCIONA. COMO HAGO PARA QUE ME FUNCIONES.
DE TODAS MANERAS COLOQUE LOS CODIGOS DE CADA BOTON POR SI HAY OTRA COSA QUE ESTE MALO.
LES RECUERDO QUE NO SE NADA DE FOXPRO. POR SI ES POSIBLE QUE ME EXPLIQUEN PASO POR PASO.. SI NO ES MUCHO ABUSO.. MUCHAS GRACIAS DE VERDAD!!!
Estos son los codigos que yo tengo en cada boton:
En Nuevo:
go bottom
append blank
thisform.txtci_clie.enabled = .T.
thisform.txtnom_clie.enabled = .T.
thisform.txtapel_clie.enabled = .T.
thisform.txtdir_clie.enabled = .T.
thisform.txttlf_clie.enabled = .T.
*Go Bottom
thisform.refresh
*append blank
thisform.txtci_clie.setfocus
thisform.txtci_clie.value = 0
thisform.txtnom_clie.value = ""
thisform.txtapel_clie.value = ""
thisform.txtdir_clie.value = ""
thisform.txttlf_clie.value = 0
thisform.refresh
En Guardar:
replace tcliente.ci_clie with thisform.txtci_clie.value
replace tcliente.nom_clie with thisform.txtnom_clie.value
replace tcliente.apel_clie with thisform.txtapel_clie.value
replace tcliente.dir_clie with thisform.txtdir_clie.value
replace tcliente.tlf_clie with thisform.txttlf_clie.value
thisform.refresh
if empty (thisform.txtnom_clie.value)
messagebox("El Nombre Del Cliente No Está",48,"Error")
thisform.txtnom_clie.setfocus
endif
if empty (thisform.txtapel_clie.value)
messagebox("El Apellido Del Cliente No Está",48,"Error")
thisform.txtapel_clie.setfocus
endif
if empty (thisform.txtci_clie.value)
messagebox("La Cédula Del Cliente No Está",48,"Error")
thisform.txtci_clie.setfocus
endif
if empty (thisform.txtdir_clie.value)
messagebox("La Dirección Del Cliente No Está",48,"Error")
thisform.txtdir_clie.setfocus
endif
if empty (thisform.txttlf_clie.value)
messagebox("El Número Del Cliente No Está",48,"Error")
thisform.txttlf_clie.setfocus
endif
Boton de Salir:
Release thisform
Uno que yo adicione "Eliminar"
thisform.txtci_clie.setfocus
thisform.txtci_clie.value = ""
thisform.txtnom_clie.value = ""
thisform.txtapel_clie.value = ""
thisform.txtdir_clie.value = ""
thisform.txttlf_clie.value = ""
thisform.refresh.
Valora esta pregunta


0