SlideShare uma empresa Scribd logo
1 de 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

Mais conteúdo relacionado

Mais procurados

Mais procurados (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
 

Destaque

Ej. 6. temas en nasal. grados adj. aoristo.
Ej. 6. temas en nasal. grados adj. aoristo.Ej. 6. temas en nasal. grados adj. aoristo.
Ej. 6. temas en nasal. grados adj. aoristo.Debbie Safito
 
Clean_Harbors_English_Corporate_Presentation_2016
Clean_Harbors_English_Corporate_Presentation_2016Clean_Harbors_English_Corporate_Presentation_2016
Clean_Harbors_English_Corporate_Presentation_2016Shane Eisenhauer
 
Referencement 1404895674
Referencement 1404895674Referencement 1404895674
Referencement 1404895674ot gevrey
 
Manager Training Certificate
Manager Training CertificateManager Training Certificate
Manager Training CertificateDuryodhan Boitai
 
Air pollution and Water pollution
Air pollution and Water pollution Air pollution and Water pollution
Air pollution and Water pollution Patel Mit
 
Eslam El-Gameil Khiry CV9
Eslam El-Gameil Khiry CV9Eslam El-Gameil Khiry CV9
Eslam El-Gameil Khiry CV9Eslam EL-Gamil
 
Encontro da Comunidade Pentaho. Aprenda mais sobre a mais poderosa e conheci...
Encontro da Comunidade Pentaho.  Aprenda mais sobre a mais poderosa e conheci...Encontro da Comunidade Pentaho.  Aprenda mais sobre a mais poderosa e conheci...
Encontro da Comunidade Pentaho. Aprenda mais sobre a mais poderosa e conheci...Caio Moreno
 
How predictive algorithms help you to engage and retain visitors
How predictive algorithms help you to engage and retain visitorsHow predictive algorithms help you to engage and retain visitors
How predictive algorithms help you to engage and retain visitorsAkanoo
 
The fundamental principles of success
The fundamental principles of successThe fundamental principles of success
The fundamental principles of successContrast Contrast
 
Le vin 2.0 vinagora 2012 formation 01 outils sociaux - philippe hugon vinte...
Le vin 2.0 vinagora 2012   formation 01 outils sociaux - philippe hugon vinte...Le vin 2.0 vinagora 2012   formation 01 outils sociaux - philippe hugon vinte...
Le vin 2.0 vinagora 2012 formation 01 outils sociaux - philippe hugon vinte...Vinternet
 

Destaque (16)

Ej. 6. temas en nasal. grados adj. aoristo.
Ej. 6. temas en nasal. grados adj. aoristo.Ej. 6. temas en nasal. grados adj. aoristo.
Ej. 6. temas en nasal. grados adj. aoristo.
 
Clean_Harbors_English_Corporate_Presentation_2016
Clean_Harbors_English_Corporate_Presentation_2016Clean_Harbors_English_Corporate_Presentation_2016
Clean_Harbors_English_Corporate_Presentation_2016
 
Referencement 1404895674
Referencement 1404895674Referencement 1404895674
Referencement 1404895674
 
Nuts
NutsNuts
Nuts
 
Manager Training Certificate
Manager Training CertificateManager Training Certificate
Manager Training Certificate
 
Diego mauricio
Diego mauricioDiego mauricio
Diego mauricio
 
Sistem hormon
Sistem hormonSistem hormon
Sistem hormon
 
Caim era do maligno andre
Caim era do maligno   andreCaim era do maligno   andre
Caim era do maligno andre
 
Air pollution and Water pollution
Air pollution and Water pollution Air pollution and Water pollution
Air pollution and Water pollution
 
Eslam El-Gameil Khiry CV9
Eslam El-Gameil Khiry CV9Eslam El-Gameil Khiry CV9
Eslam El-Gameil Khiry CV9
 
Encontro da Comunidade Pentaho. Aprenda mais sobre a mais poderosa e conheci...
Encontro da Comunidade Pentaho.  Aprenda mais sobre a mais poderosa e conheci...Encontro da Comunidade Pentaho.  Aprenda mais sobre a mais poderosa e conheci...
Encontro da Comunidade Pentaho. Aprenda mais sobre a mais poderosa e conheci...
 
How predictive algorithms help you to engage and retain visitors
How predictive algorithms help you to engage and retain visitorsHow predictive algorithms help you to engage and retain visitors
How predictive algorithms help you to engage and retain visitors
 
The fundamental principles of success
The fundamental principles of successThe fundamental principles of success
The fundamental principles of success
 
TERAPIA RACIONAL EMOTIVA
TERAPIA RACIONAL EMOTIVATERAPIA RACIONAL EMOTIVA
TERAPIA RACIONAL EMOTIVA
 
Letter Writing in URDU
Letter Writing in URDULetter Writing in URDU
Letter Writing in URDU
 
Le vin 2.0 vinagora 2012 formation 01 outils sociaux - philippe hugon vinte...
Le vin 2.0 vinagora 2012   formation 01 outils sociaux - philippe hugon vinte...Le vin 2.0 vinagora 2012   formation 01 outils sociaux - philippe hugon vinte...
Le vin 2.0 vinagora 2012 formation 01 outils sociaux - philippe hugon vinte...
 

Semelhante a Problema aplicativo sql

Proyecto de gambas parte 2
Proyecto de gambas parte 2Proyecto de gambas parte 2
Proyecto de gambas parte 2Yulissa98564
 
Proyecto de gambas parte 2
Proyecto de gambas parte 2Proyecto de gambas parte 2
Proyecto de gambas parte 2Yuliana9_7
 
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)Pablo Haya
 
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 Clientejameszx
 
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 Clientejameszx
 
Operacion variables.docx
Operacion variables.docxOperacion variables.docx
Operacion variables.docxAlejoMolina16
 
FormularioFaturaFoxpro
FormularioFaturaFoxproFormularioFaturaFoxpro
FormularioFaturaFoxproemeronez
 

Semelhante a 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
 

Último

9-Sociales-Colombia siglo XX.pdf sociales
9-Sociales-Colombia siglo XX.pdf sociales9-Sociales-Colombia siglo XX.pdf sociales
9-Sociales-Colombia siglo XX.pdf socialesJhonathanRodriguez10
 
TALLER SOBRE METODOLOGÍAS DE DESARROLLO DE SOFTWARE..pdf
TALLER SOBRE METODOLOGÍAS DE DESARROLLO DE SOFTWARE..pdfTALLER SOBRE METODOLOGÍAS DE DESARROLLO DE SOFTWARE..pdf
TALLER SOBRE METODOLOGÍAS DE DESARROLLO DE SOFTWARE..pdfMiguelGomez900779
 
644400074-LA-CONSOLIDACION-DE-LA-REPUBLICA-OLIGARQUICA-pdf.pptx
644400074-LA-CONSOLIDACION-DE-LA-REPUBLICA-OLIGARQUICA-pdf.pptx644400074-LA-CONSOLIDACION-DE-LA-REPUBLICA-OLIGARQUICA-pdf.pptx
644400074-LA-CONSOLIDACION-DE-LA-REPUBLICA-OLIGARQUICA-pdf.pptxRosiClaros
 
Presentación Materiales para la Construcción.ppt
Presentación Materiales para la Construcción.pptPresentación Materiales para la Construcción.ppt
Presentación Materiales para la Construcción.pptCARLOSAXELVENTURAVID
 
linea de tiempo television y su avance en los años
linea de tiempo television y su avance en los añoslinea de tiempo television y su avance en los años
linea de tiempo television y su avance en los añosMaraPazCrdenas
 
Home Assistant - Un Hub para controlarlos a todos
Home Assistant - Un Hub para controlarlos a todosHome Assistant - Un Hub para controlarlos a todos
Home Assistant - Un Hub para controlarlos a todosDebora Gomez Bertoli
 
PLANIFICACION ANUAL , año 2024. nivel primaria
PLANIFICACION ANUAL , año 2024. nivel primariaPLANIFICACION ANUAL , año 2024. nivel primaria
PLANIFICACION ANUAL , año 2024. nivel primariajosevilla696981
 
PERFIL SECRETARIAL - SECRETARIADO EJECUTIVO
PERFIL SECRETARIAL - SECRETARIADO EJECUTIVOPERFIL SECRETARIAL - SECRETARIADO EJECUTIVO
PERFIL SECRETARIAL - SECRETARIADO EJECUTIVOAdrianaBernal82
 

Último (8)

9-Sociales-Colombia siglo XX.pdf sociales
9-Sociales-Colombia siglo XX.pdf sociales9-Sociales-Colombia siglo XX.pdf sociales
9-Sociales-Colombia siglo XX.pdf sociales
 
TALLER SOBRE METODOLOGÍAS DE DESARROLLO DE SOFTWARE..pdf
TALLER SOBRE METODOLOGÍAS DE DESARROLLO DE SOFTWARE..pdfTALLER SOBRE METODOLOGÍAS DE DESARROLLO DE SOFTWARE..pdf
TALLER SOBRE METODOLOGÍAS DE DESARROLLO DE SOFTWARE..pdf
 
644400074-LA-CONSOLIDACION-DE-LA-REPUBLICA-OLIGARQUICA-pdf.pptx
644400074-LA-CONSOLIDACION-DE-LA-REPUBLICA-OLIGARQUICA-pdf.pptx644400074-LA-CONSOLIDACION-DE-LA-REPUBLICA-OLIGARQUICA-pdf.pptx
644400074-LA-CONSOLIDACION-DE-LA-REPUBLICA-OLIGARQUICA-pdf.pptx
 
Presentación Materiales para la Construcción.ppt
Presentación Materiales para la Construcción.pptPresentación Materiales para la Construcción.ppt
Presentación Materiales para la Construcción.ppt
 
linea de tiempo television y su avance en los años
linea de tiempo television y su avance en los añoslinea de tiempo television y su avance en los años
linea de tiempo television y su avance en los años
 
Home Assistant - Un Hub para controlarlos a todos
Home Assistant - Un Hub para controlarlos a todosHome Assistant - Un Hub para controlarlos a todos
Home Assistant - Un Hub para controlarlos a todos
 
PLANIFICACION ANUAL , año 2024. nivel primaria
PLANIFICACION ANUAL , año 2024. nivel primariaPLANIFICACION ANUAL , año 2024. nivel primaria
PLANIFICACION ANUAL , año 2024. nivel primaria
 
PERFIL SECRETARIAL - SECRETARIADO EJECUTIVO
PERFIL SECRETARIAL - SECRETARIADO EJECUTIVOPERFIL SECRETARIAL - SECRETARIADO EJECUTIVO
PERFIL SECRETARIAL - SECRETARIADO EJECUTIVO
 

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