SlideShare a Scribd company logo
1 of 6
PROBLEMA APLICATIVO SQL
El siguiente problema es una aplicación de las instrucciones de SQL.
Paso 1.- Crear proyecto con el generador de proyectos
· Carpeta : D:SQLFOX10
· Proyecto : Proy1
· Base de datos: datos1
· Tablas y relacionamiento.
Paso 2.- Creación de formularios.
Formulario de ingreso de contraseña
·
Dos clic en boton aceptar (clic)
if thisform.text1.value="empleado" THEN
MESSAGEBOX ("La Clave correcta")
DO FORM inicio
else
messagebox("La Clave es Incorrecta")
THISFORM.REFRESH
endif
· Dos clic en el boton salir (clic)
thisform.release
· Dos clic en time1 (timer)
thisform.marquee.caption="BIENVENIDOS AL SISTEMA DE INGRESO Y CALCULOS DE SUELDO DE
EMPLEADO"
thisform.marquee.left=thisform.marquee.left-100
if thisform.marquee.left<=-500 thisform.marquee.left=200 endif
· Dos clic en time2 (timer)
if thisform.hora.caption !=time()
thisform.hora.caption =time()
endif
· Formulario 2
·
Dos clic en form1 (activate)
set defa to E:SQLFOX10
·Dos clic en ver relacionamiento de tablas (clic)
modify database
·Dos clic en administrador de categorias(clic)
do form categorias
·Dos clic en registro de datos de empleado(clic)
do form empleados
·Dos clic en calculo de sueldo (clic
do form sueldos
·Dos clic en salir (clic)
Thisform.release
Formulario 3
· DOS CLIC EN FORMULARIO (ACTIVATE)
close database
open database ("E:SQLFOX10datos1")
· DOS CLIC EN EL BOTON MOSTRAR (CLIC)
select categoria.categoria,prehora from categoria
· DOS CLIC EN EL BOTON GRABAR (CLIC)
with thisform
use categoria
insert into categoria(categoria,prehora)values(.text1.value,val(.text2.value))
=messagebox("Este Registro fue Grabado")
endwith
· DOS CLIC EN EL BOTON TEXT1 (INTERACTIVE CHANGE)
with thisform
titulo='Resultado de Registro'
texto = 'Este Registro['+.text1.value+'] ya Existe.....desea Eliminarlo?'
tipo = 4+32+256
use categoria
go top
flag = 0
do while !eof()
if rtrim(ltrim(.text1.value))=ltrim(rtrim(categoria))
.text2.value = prehora
flag = 1
endif
skip
enddo
if flag = 1
opcion = Messagebox(texto,tipo,titulo)
do case
case opcion = 6
delete from categoria where categoria = thisform .text1.value
wait window "eligio si....el registro['+.text1.value+']fue eliminado"
pack
.text1.value = ""
.text2.value = ""
.text1.setfocus
endcase
endif
endwith
· DOS CLIC EN EL BOTON SALIR (CLIC)
thisform.release
CREANDO FORMULARIOS DE INGRESO DE EMPLEADOS
·
DOS CLIC EN EL BOTON PRIMERO(CLIC)
SELECT sueldo
GO TOP
MESSAGEBOX("ESTE ES EL PRIMER REGISTRO")
THISFORM.REFRESH
· DOS CLIC EN EL BOTON SIGUIENTE(CLIC)
SELECT sueldo
SKIP
IF EOF()
GO BOTTOM
MESSAGEBOX("ESTE ES EL PRIMER REGISTRO")
ENDIF
THISFORM.REFRESH
· DOS CLIC EN EL BOTON ANTERIOR (CLIC)
SELECT sueldo
SKIP -1
IF BOF()
GO TOP
MESSAGEBOX("ESTE ES EL ULTIMO REGISTRO")
ENDIF
THISFORM.REFRESH
· DOS CLIC EN EL BOTON FINAL(CLIC)
SELECT sueldo
GO BOTTOM
MESSAGEBOX("ESTE ES EL ULTIMO REGISTRO...")
THISFORM.REFRESH
· DOS CLIC EN FORMULARIO (ACTIVATE)
with thisform
set defa to E:SQLFOX10
close table all
use empleados
go bottom
.txtDni.value= dni
.txtNombre.value= nombre
.txtDireccion.value= direccion
.combo1.value= sexo
.combo2.value= categoria
endwith
· DOS CLIC EN EL BOTON GUARDAR (CLIC)
with thisform
use empleados
insert into empleados(dni,nombre,direccion,sexo,categoria)values ;
(.txtDni.value,.txtNombre.value,.txtDireccion.value,.combo1.value,.combo2.value)
=messagebox("ESTE REGISTRO FUE GUARDADO")
endwith
· DOS CLIC EN BOTON ELIMINAR TODOS LOS REGISTROS (CLIC)
Close database
Open database ("E:SQLFOX10datos1")
Use empleados
Delete fromempleados
· DOS CLIC EN BOTON ELIMINAR (CLIC)
SELECT empleados
MEN=MESSAGEBOX("ESTA SEGURO DESEA ELIMINAR",4+32+256,"ADVERTENCIA")
do case
case MEN=6
DELETE
PACK
go top
THISFORM.REFRESH
case MEN=7
thisform.refresh
endcase
· DOS CLIC EN BOTON NUEVO (CLIC)
with thisform
.txtDni.value= ""
.txtNombre.value= ""
.txtDireccion.value= ""
.combo1.value= ""
.combo2.value= ""
.txtDni.setfocus
.txtDni.value= dni
.txtNombre.value= nombre
.txtDireccion.value= direccion
.combo1.value= sexo
.combo2.value= categoria
.txtDni.setfocus
endwith
· DOS CLIC EN BOTON EXAMINAR (CLIC)
browse
· DOS CLIC EN BOTON SALIR (CLIC)
Thisform.release
CREANDO FORMULARIO DE CALCULAR SUELDO
· DOS CLIC EN FORMULARIO (ACTIVATE)
with thisform
set defa to E:SQLFOX10
close table all
use sueldo
go bottom
.txtContador.value= Contador
.txtDni.value=Dni
.txtHtrab.value= Htrab
.txtSbruto.value= Sbruto
.txtEssalud.value= Essalud
.txtFonavi.value=Fonavi
.txtNeto.value= Neto
endwith
· DOS CLIC EN EL BOTON GUARDAR (CLIC)
with thisform
use sueldo
insert into sueldo(contador,dni,htrab,sbruto,essalud,fonavi,neto)values ;
(.txtContador.value,.txtDni.value,.txtHtrab.value,.txtSbruto.value,.txtEssalud.value;
.txtFonavi.value,.txtNeto.value)
=messagebox("ESTE REGISTRO FUE GUARDADO")
endwith
· DOS CLIC EN BOTON ELIMINAR (CLIC)
Close database
Open database ("E:SQLFOX10datos1")
Use sueldo
Delete from sueldo
· DOS CLIC EN BOTON ELIMINAR (CLIC)
SELECT sueldos
MEN=MESSAGEBOX("ESTA SEGURO DESEA ELIMINAR",4+32+256,"ADVERTENCIA")
do case
case MEN=6
DELETE
PACK
go top
THISFORM.REFRESH
case MEN=7
thisform.refresh
endcase
· DOS CLIC EN BOTON NUEVO (CLIC)
with thisform
.txtContador.enabled=.t.
.txtDni.enabled=.t.
.txtHtrab.enabled=.t.
.txtSbruto.enabled=.t.
.txtEssalud.enabled=.t.
.txtFonavi.enabled=.t.
.txtNeto.enabled=.t.
.txtContador.value= ""
.txtDni.value=""
.txtHtrab.value= ""
.txtSbruto.value= ""
.txtEssalud.value= ""
.txtFonavi.value=""
.txtNeto.value= ""
.txtcontador.value=""
.combo1.value=""
.txtContador.setfocus
.txtContador.value=contador
.txtDni.value=Dni
.txtHtrab.value=Htrab
.txtSbruto.value=Sbruto
.txtEssalud.value=Essalud
.txtFonavi.value=Fonavi
.txtNeto.value= Neto
endwith
· DOS CLIC EN BOTON EXAMINAR (CLIC)
browse
· DOS CLIC EN BOTON SALIR (CLIC)
Thisform.release
· DOS CLIC EN BOTON CALCULAR
f = 0
e = 0
n = 0
d = 0
h = val(.txtHtrab.value)
c = .combo1.value
do case
case c = "A"
b = h*100
f = b * 0.10
e = b * 0.15
case c = "B"
b = h*80
f = b * 0.10
e = b * 0.15
case c = "C"
b = h*60
f = b * 0.10
e = b * 0.15
case c = "D"
b = h*40
f = b * 0.10
e = b * 0.15
otherwise
=messagebox("la categoria no existe")
.combo1.setfocus
endcase
d = f + e
n = b - d
.txtSbruto.value = b
.txtEssalud.value = e
.txtFonavi.value = f
.txtNeto.value = n
Endwith
· DOS CLIC EN EL BOTON PRIMERO(CLIC)
SELECT sueldo
GO TOP
MESSAGEBOX("ESTE ES EL PRIMER REGISTRO")
THISFORM.REFRESH
· DOS CLIC EN EL BOTON SIGUIENTE(CLIC)
SELECT sueldo
SKIP
IF EOF()
GO BOTTOM
MESSAGEBOX("ESTE ES EL PRIMER REGISTRO")
ENDIF
THISFORM.REFRESH
· DOS CLIC EN EL BOTON ANTERIOR (CLIC)
SELECT sueldo
SKIP -1
IF BOF()
GO TOP
MESSAGEBOX("ESTE ES EL ULTIMO REGISTRO")
ENDIF
THISFORM.REFRESH
· DOS CLIC EN EL BOTON FINAL(CLIC)
SELECT sueldo
GO BOTTOM
MESSAGEBOX("ESTE ES EL ULTIMO REGISTRO...")
THISFORM.REFRESH

More Related Content

What's hot (17)

Métodos abreviados de teclado de windows
Métodos abreviados de teclado de windowsMétodos abreviados de teclado de windows
Métodos abreviados de teclado de windows
 
MANUAL DE COMANDOS
MANUAL DE COMANDOSMANUAL DE COMANDOS
MANUAL DE COMANDOS
 
Rous
RousRous
Rous
 
Metodos abreviados del teclado
Metodos abreviados del tecladoMetodos abreviados del teclado
Metodos abreviados del teclado
 
Comandos del teclado
Comandos del tecladoComandos del teclado
Comandos del teclado
 
Problemas condicionales
Problemas condicionalesProblemas condicionales
Problemas condicionales
 
Tutorial Hp user rpl modo algebraico 1.2
Tutorial Hp user rpl modo algebraico 1.2Tutorial Hp user rpl modo algebraico 1.2
Tutorial Hp user rpl modo algebraico 1.2
 
MUNUAL DE COMANDOS
MUNUAL DE COMANDOS MUNUAL DE COMANDOS
MUNUAL DE COMANDOS
 
Tutorial
TutorialTutorial
Tutorial
 
Métodos abreviados del telcado
Métodos abreviados del telcadoMétodos abreviados del telcado
Métodos abreviados del telcado
 
Libre office
Libre officeLibre office
Libre office
 
Consultas para bd en mysql
Consultas para bd en mysqlConsultas para bd en mysql
Consultas para bd en mysql
 
Algoritmica i clase05 practica 5 solucionario
Algoritmica i clase05 practica 5 solucionarioAlgoritmica i clase05 practica 5 solucionario
Algoritmica i clase05 practica 5 solucionario
 
Ejercicio propuesto 2
Ejercicio propuesto 2Ejercicio propuesto 2
Ejercicio propuesto 2
 
Problemas propuesto 1 al12
Problemas propuesto 1 al12Problemas propuesto 1 al12
Problemas propuesto 1 al12
 
Atajos de windows 7
Atajos de windows 7Atajos de windows 7
Atajos de windows 7
 
Eclas rápidas
Eclas rápidasEclas rápidas
Eclas rápidas
 

Viewers also liked

Quantitative risk assessment in chemical process
Quantitative risk assessment in chemical processQuantitative risk assessment in chemical process
Quantitative risk assessment in chemical process
Thapa Prakash (TA-1)
 
Pressure Reliveing Devices1
Pressure Reliveing Devices1Pressure Reliveing Devices1
Pressure Reliveing Devices1
Om Pratap Singh
 

Viewers also liked (20)

Problema aplicativo 1
Problema aplicativo 1Problema aplicativo 1
Problema aplicativo 1
 
Norfolk's Response to the Cultural Education Challenge
Norfolk's Response to the Cultural Education ChallengeNorfolk's Response to the Cultural Education Challenge
Norfolk's Response to the Cultural Education Challenge
 
Test 1
Test 1Test 1
Test 1
 
tk2015
tk2015tk2015
tk2015
 
Aung Myint Myat - Design Portfolio
Aung Myint Myat - Design PortfolioAung Myint Myat - Design Portfolio
Aung Myint Myat - Design Portfolio
 
La tecnologia en el basketball
La tecnologia en el basketballLa tecnologia en el basketball
La tecnologia en el basketball
 
Quantitative risk assessment in chemical process
Quantitative risk assessment in chemical processQuantitative risk assessment in chemical process
Quantitative risk assessment in chemical process
 
Saurabh neuroscience. final
Saurabh neuroscience. finalSaurabh neuroscience. final
Saurabh neuroscience. final
 
Conferencia: Educando con propósito
Conferencia: Educando con propósitoConferencia: Educando con propósito
Conferencia: Educando con propósito
 
Endocarditis infecciosa
Endocarditis infecciosaEndocarditis infecciosa
Endocarditis infecciosa
 
A-frameハンズオンのQA集
A-frameハンズオンのQA集A-frameハンズオンのQA集
A-frameハンズオンのQA集
 
Estrategias exitosas para hablar con niñas y niños
Estrategias exitosas para hablar con niñas y niñosEstrategias exitosas para hablar con niñas y niños
Estrategias exitosas para hablar con niñas y niños
 
Pressure Reliveing Devices1
Pressure Reliveing Devices1Pressure Reliveing Devices1
Pressure Reliveing Devices1
 
Cure Violence - Frank Perez
Cure Violence - Frank PerezCure Violence - Frank Perez
Cure Violence - Frank Perez
 
Spomenici
SpomeniciSpomenici
Spomenici
 
Modelos predictivos: datos, métodos, problemas y aplicaciones
Modelos predictivos: datos, métodos, problemas y aplicacionesModelos predictivos: datos, métodos, problemas y aplicaciones
Modelos predictivos: datos, métodos, problemas y aplicaciones
 
PLANTEAMIENTO DEL PROBLEMA DE INVESTIGACIÓN
PLANTEAMIENTO DEL PROBLEMA DE INVESTIGACIÓNPLANTEAMIENTO DEL PROBLEMA DE INVESTIGACIÓN
PLANTEAMIENTO DEL PROBLEMA DE INVESTIGACIÓN
 
Presentación curso maquillaje mishell
Presentación curso maquillaje mishellPresentación curso maquillaje mishell
Presentación curso maquillaje mishell
 
Obste hormonas placentarias
Obste hormonas placentariasObste hormonas placentarias
Obste hormonas placentarias
 
Slideshare ppt
Slideshare pptSlideshare ppt
Slideshare ppt
 

Similar to Problema aplicativo sql

Formulario De Registro De Boleta De Ventay Mantenimiento De Cliente
Formulario De Registro De Boleta De Ventay Mantenimiento De ClienteFormulario De Registro De Boleta De Ventay Mantenimiento De Cliente
Formulario De Registro De Boleta De Ventay Mantenimiento De Cliente
jameszx
 
Formulario De Registro De Boleta De Ventay Mantenimiento De Cliente
Formulario De Registro De Boleta De Ventay Mantenimiento De ClienteFormulario De Registro De Boleta De Ventay Mantenimiento De Cliente
Formulario De Registro De Boleta De Ventay Mantenimiento De Cliente
jameszx
 
FormularioFaturaFoxpro
FormularioFaturaFoxproFormularioFaturaFoxpro
FormularioFaturaFoxpro
emeronez
 

Similar to Problema aplicativo sql (20)

Proyecto de gambas parte 2
Proyecto de gambas parte 2Proyecto de gambas parte 2
Proyecto de gambas parte 2
 
Proyecto de gambas parte 2
Proyecto de gambas parte 2Proyecto de gambas parte 2
Proyecto de gambas parte 2
 
Separata de vb 2015
Separata de vb 2015Separata de vb 2015
Separata de vb 2015
 
Elemento n3
Elemento n3Elemento n3
Elemento n3
 
Botón cantycelar cmd cancelar
Botón cantycelar  cmd cancelarBotón cantycelar  cmd cancelar
Botón cantycelar cmd cancelar
 
Informe 22
Informe 22Informe 22
Informe 22
 
Tema 2 - Programación básica en C (III)
Tema 2  - Programación básica en C (III)Tema 2  - Programación básica en C (III)
Tema 2 - Programación básica en C (III)
 
Formulario De Registro De Boleta De Ventay Mantenimiento De Cliente
Formulario De Registro De Boleta De Ventay Mantenimiento De ClienteFormulario De Registro De Boleta De Ventay Mantenimiento De Cliente
Formulario De Registro De Boleta De Ventay Mantenimiento De Cliente
 
Formulario De Registro De Boleta De Ventay Mantenimiento De Cliente
Formulario De Registro De Boleta De Ventay Mantenimiento De ClienteFormulario De Registro De Boleta De Ventay Mantenimiento De Cliente
Formulario De Registro De Boleta De Ventay Mantenimiento De Cliente
 
Cuaderno digital
Cuaderno digitalCuaderno digital
Cuaderno digital
 
Operacion variables.docx
Operacion variables.docxOperacion variables.docx
Operacion variables.docx
 
Tutorial n°3 excel 2010
Tutorial n°3 excel 2010Tutorial n°3 excel 2010
Tutorial n°3 excel 2010
 
Cristinagananparedes
CristinagananparedesCristinagananparedes
Cristinagananparedes
 
Ejemploc de caso
Ejemploc de casoEjemploc de caso
Ejemploc de caso
 
FormularioFaturaFoxpro
FormularioFaturaFoxproFormularioFaturaFoxpro
FormularioFaturaFoxpro
 
Acmar trucos de visual basic(2)
Acmar   trucos de visual basic(2)Acmar   trucos de visual basic(2)
Acmar trucos de visual basic(2)
 
Programación de código
Programación de códigoProgramación de código
Programación de código
 
Guía Practica de JavaScript
Guía Practica de JavaScriptGuía Practica de JavaScript
Guía Practica de JavaScript
 
Dbdd u1 ea_dila
Dbdd u1 ea_dilaDbdd u1 ea_dila
Dbdd u1 ea_dila
 
Buenas
BuenasBuenas
Buenas
 

Recently uploaded (6)

Taller construcción de Prototipos Uno uML
Taller construcción de Prototipos Uno uMLTaller construcción de Prototipos Uno uML
Taller construcción de Prototipos Uno uML
 
PPT obligaciones ambientales oefa minan.pptx
PPT obligaciones ambientales oefa minan.pptxPPT obligaciones ambientales oefa minan.pptx
PPT obligaciones ambientales oefa minan.pptx
 
PPT SESION 5 ARTE Y CREATIVIDAD (1).pptx
PPT SESION 5 ARTE Y CREATIVIDAD (1).pptxPPT SESION 5 ARTE Y CREATIVIDAD (1).pptx
PPT SESION 5 ARTE Y CREATIVIDAD (1).pptx
 
477407774-EMBRIOLOGIA-DEL-SISTEMA-NERVIOSO.pptx
477407774-EMBRIOLOGIA-DEL-SISTEMA-NERVIOSO.pptx477407774-EMBRIOLOGIA-DEL-SISTEMA-NERVIOSO.pptx
477407774-EMBRIOLOGIA-DEL-SISTEMA-NERVIOSO.pptx
 
Vision de asignatura ESTRUCTURA DE DATOS.pptx
Vision de asignatura ESTRUCTURA DE DATOS.pptxVision de asignatura ESTRUCTURA DE DATOS.pptx
Vision de asignatura ESTRUCTURA DE DATOS.pptx
 
LAS TETAS DE MARIA GUEVARA REVISTA DIGITAL INF.pdf
LAS TETAS DE MARIA GUEVARA REVISTA DIGITAL INF.pdfLAS TETAS DE MARIA GUEVARA REVISTA DIGITAL INF.pdf
LAS TETAS DE MARIA GUEVARA REVISTA DIGITAL INF.pdf
 

Problema aplicativo sql

  • 1. PROBLEMA APLICATIVO SQL El siguiente problema es una aplicación de las instrucciones de SQL. Paso 1.- Crear proyecto con el generador de proyectos · Carpeta : D:SQLFOX10 · Proyecto : Proy1 · Base de datos: datos1 · Tablas y relacionamiento. Paso 2.- Creación de formularios. Formulario de ingreso de contraseña · Dos clic en boton aceptar (clic) if thisform.text1.value="empleado" THEN MESSAGEBOX ("La Clave correcta") DO FORM inicio else messagebox("La Clave es Incorrecta") THISFORM.REFRESH endif · Dos clic en el boton salir (clic) thisform.release · Dos clic en time1 (timer) thisform.marquee.caption="BIENVENIDOS AL SISTEMA DE INGRESO Y CALCULOS DE SUELDO DE EMPLEADO" thisform.marquee.left=thisform.marquee.left-100 if thisform.marquee.left<=-500 thisform.marquee.left=200 endif · Dos clic en time2 (timer) if thisform.hora.caption !=time() thisform.hora.caption =time() endif · Formulario 2
  • 2. · Dos clic en form1 (activate) set defa to E:SQLFOX10 ·Dos clic en ver relacionamiento de tablas (clic) modify database ·Dos clic en administrador de categorias(clic) do form categorias ·Dos clic en registro de datos de empleado(clic) do form empleados ·Dos clic en calculo de sueldo (clic do form sueldos ·Dos clic en salir (clic) Thisform.release Formulario 3 · DOS CLIC EN FORMULARIO (ACTIVATE) close database open database ("E:SQLFOX10datos1") · DOS CLIC EN EL BOTON MOSTRAR (CLIC) select categoria.categoria,prehora from categoria · DOS CLIC EN EL BOTON GRABAR (CLIC) with thisform use categoria insert into categoria(categoria,prehora)values(.text1.value,val(.text2.value)) =messagebox("Este Registro fue Grabado") endwith · DOS CLIC EN EL BOTON TEXT1 (INTERACTIVE CHANGE) with thisform titulo='Resultado de Registro' texto = 'Este Registro['+.text1.value+'] ya Existe.....desea Eliminarlo?' tipo = 4+32+256 use categoria go top flag = 0 do while !eof() if rtrim(ltrim(.text1.value))=ltrim(rtrim(categoria)) .text2.value = prehora flag = 1 endif skip enddo if flag = 1
  • 3. opcion = Messagebox(texto,tipo,titulo) do case case opcion = 6 delete from categoria where categoria = thisform .text1.value wait window "eligio si....el registro['+.text1.value+']fue eliminado" pack .text1.value = "" .text2.value = "" .text1.setfocus endcase endif endwith · DOS CLIC EN EL BOTON SALIR (CLIC) thisform.release CREANDO FORMULARIOS DE INGRESO DE EMPLEADOS · DOS CLIC EN EL BOTON PRIMERO(CLIC) SELECT sueldo GO TOP MESSAGEBOX("ESTE ES EL PRIMER REGISTRO") THISFORM.REFRESH · DOS CLIC EN EL BOTON SIGUIENTE(CLIC) SELECT sueldo SKIP IF EOF() GO BOTTOM MESSAGEBOX("ESTE ES EL PRIMER REGISTRO") ENDIF THISFORM.REFRESH · DOS CLIC EN EL BOTON ANTERIOR (CLIC) SELECT sueldo SKIP -1 IF BOF() GO TOP MESSAGEBOX("ESTE ES EL ULTIMO REGISTRO") ENDIF THISFORM.REFRESH · DOS CLIC EN EL BOTON FINAL(CLIC) SELECT sueldo GO BOTTOM MESSAGEBOX("ESTE ES EL ULTIMO REGISTRO...") THISFORM.REFRESH · DOS CLIC EN FORMULARIO (ACTIVATE) with thisform set defa to E:SQLFOX10 close table all use empleados go bottom .txtDni.value= dni .txtNombre.value= nombre .txtDireccion.value= direccion
  • 4. .combo1.value= sexo .combo2.value= categoria endwith · DOS CLIC EN EL BOTON GUARDAR (CLIC) with thisform use empleados insert into empleados(dni,nombre,direccion,sexo,categoria)values ; (.txtDni.value,.txtNombre.value,.txtDireccion.value,.combo1.value,.combo2.value) =messagebox("ESTE REGISTRO FUE GUARDADO") endwith · DOS CLIC EN BOTON ELIMINAR TODOS LOS REGISTROS (CLIC) Close database Open database ("E:SQLFOX10datos1") Use empleados Delete fromempleados · DOS CLIC EN BOTON ELIMINAR (CLIC) SELECT empleados MEN=MESSAGEBOX("ESTA SEGURO DESEA ELIMINAR",4+32+256,"ADVERTENCIA") do case case MEN=6 DELETE PACK go top THISFORM.REFRESH case MEN=7 thisform.refresh endcase · DOS CLIC EN BOTON NUEVO (CLIC) with thisform .txtDni.value= "" .txtNombre.value= "" .txtDireccion.value= "" .combo1.value= "" .combo2.value= "" .txtDni.setfocus .txtDni.value= dni .txtNombre.value= nombre .txtDireccion.value= direccion .combo1.value= sexo .combo2.value= categoria .txtDni.setfocus endwith · DOS CLIC EN BOTON EXAMINAR (CLIC) browse · DOS CLIC EN BOTON SALIR (CLIC) Thisform.release CREANDO FORMULARIO DE CALCULAR SUELDO · DOS CLIC EN FORMULARIO (ACTIVATE) with thisform
  • 5. set defa to E:SQLFOX10 close table all use sueldo go bottom .txtContador.value= Contador .txtDni.value=Dni .txtHtrab.value= Htrab .txtSbruto.value= Sbruto .txtEssalud.value= Essalud .txtFonavi.value=Fonavi .txtNeto.value= Neto endwith · DOS CLIC EN EL BOTON GUARDAR (CLIC) with thisform use sueldo insert into sueldo(contador,dni,htrab,sbruto,essalud,fonavi,neto)values ; (.txtContador.value,.txtDni.value,.txtHtrab.value,.txtSbruto.value,.txtEssalud.value; .txtFonavi.value,.txtNeto.value) =messagebox("ESTE REGISTRO FUE GUARDADO") endwith · DOS CLIC EN BOTON ELIMINAR (CLIC) Close database Open database ("E:SQLFOX10datos1") Use sueldo Delete from sueldo · DOS CLIC EN BOTON ELIMINAR (CLIC) SELECT sueldos MEN=MESSAGEBOX("ESTA SEGURO DESEA ELIMINAR",4+32+256,"ADVERTENCIA") do case case MEN=6 DELETE PACK go top THISFORM.REFRESH case MEN=7 thisform.refresh endcase · DOS CLIC EN BOTON NUEVO (CLIC) with thisform .txtContador.enabled=.t. .txtDni.enabled=.t. .txtHtrab.enabled=.t. .txtSbruto.enabled=.t. .txtEssalud.enabled=.t. .txtFonavi.enabled=.t. .txtNeto.enabled=.t. .txtContador.value= "" .txtDni.value="" .txtHtrab.value= "" .txtSbruto.value= "" .txtEssalud.value= "" .txtFonavi.value="" .txtNeto.value= "" .txtcontador.value="" .combo1.value="" .txtContador.setfocus .txtContador.value=contador .txtDni.value=Dni .txtHtrab.value=Htrab .txtSbruto.value=Sbruto .txtEssalud.value=Essalud .txtFonavi.value=Fonavi .txtNeto.value= Neto endwith · DOS CLIC EN BOTON EXAMINAR (CLIC) browse · DOS CLIC EN BOTON SALIR (CLIC) Thisform.release · DOS CLIC EN BOTON CALCULAR
  • 6. f = 0 e = 0 n = 0 d = 0 h = val(.txtHtrab.value) c = .combo1.value do case case c = "A" b = h*100 f = b * 0.10 e = b * 0.15 case c = "B" b = h*80 f = b * 0.10 e = b * 0.15 case c = "C" b = h*60 f = b * 0.10 e = b * 0.15 case c = "D" b = h*40 f = b * 0.10 e = b * 0.15 otherwise =messagebox("la categoria no existe") .combo1.setfocus endcase d = f + e n = b - d .txtSbruto.value = b .txtEssalud.value = e .txtFonavi.value = f .txtNeto.value = n Endwith · DOS CLIC EN EL BOTON PRIMERO(CLIC) SELECT sueldo GO TOP MESSAGEBOX("ESTE ES EL PRIMER REGISTRO") THISFORM.REFRESH · DOS CLIC EN EL BOTON SIGUIENTE(CLIC) SELECT sueldo SKIP IF EOF() GO BOTTOM MESSAGEBOX("ESTE ES EL PRIMER REGISTRO") ENDIF THISFORM.REFRESH · DOS CLIC EN EL BOTON ANTERIOR (CLIC) SELECT sueldo SKIP -1 IF BOF() GO TOP MESSAGEBOX("ESTE ES EL ULTIMO REGISTRO") ENDIF THISFORM.REFRESH · DOS CLIC EN EL BOTON FINAL(CLIC) SELECT sueldo GO BOTTOM MESSAGEBOX("ESTE ES EL ULTIMO REGISTRO...") THISFORM.REFRESH