lunes, 24 de julio de 2017

 

CheckBox, RadioButton y HProgressBar en Power Builder 12.0

hola sean bienvenidos a este blog de programación
bueno en esta entrada les compartiré ejercicios en power builder 12.0 uso del control checkbox
uso de fechas y horas.

Se desea calcular aporte familiar,estacionamiento en un centro turístico

Diseño de nuestro formulario es lo siguiente





codigo:
Function




int hijo,rest,mesa,total,cantidad
double estacio,gturista,tot
cantidad=integer(sle_hi.text)


if cbx_xhijo.checked=true then hijo=3.50*cantidad
if cbx_resta.checked=true then rest=8
if cbx_mbillar.checked=true then
            mesa=15
total=hijo+rest+mesa
st_aporte.text=string(total)


if cbx_estacio.checked=true  then estacio=total*0.0676
if cbx_gturistica.checked=true then gturista=total * 0.085
tot=estacio+gturista
st_aportaciones.text=string(tot)

end if
st_neto.text=string(total -tot)



BOTON NUEVO
sle_cod.text=""
sle_empleado.text=""
sle_hi.text=""
st_aporte.text=""
st_aportaciones.text=""
st_neto.text=""
sle_codigo.setfocus()

EVENTO (Activate) formulario
st_fecha.text=string(today())

EVENTO (Modified)
Long s_nombre
 string fi
 s_nombre=Len(sle_codigo.text)
fi= Fill ("0",5)
sle_codigo.text=string(fi)+(sle_codigo.text)
sle_empleado.setfocus()


Share:

0 comentarios:

Publicar un comentario

Dudas y sugerencias aqui