Anda di halaman 1dari 3

Examen

CODIGOS:
Public Class Form1
Dim maestro, oficial, peon, descuento, categoria, normales, essalud, snp,
impuesto, total, extras As Integer

Private Sub baceptar_Actived(sender As Object, e As EventArgs) Handles


baceptar.Click
maestro = Val(tnormales.Text)
maestro = Val(textras.Text)
oficial = Val(tnormales.Text)
oficial = Val(textras.Text)
peon = Val(tnormales.Text)
peon = Val(textras.Text)
'variable para el ingreso en horas
tnor.Text = Val(tnormales.Text)
ttex.Text = Val(textras.Text)
ttotalingresos.Text = Val(tnor.Text) + Val(ttex.Text)

'Variable para el descuento de los ingresos


If total > 100 Then
essalud = 0.03 * Val(ttotalingresos.Text)
Else
essalud = 0.02 * Val(ttotalingresos.Text)
End If
snp = 0.05 * Val(ttotalingresos.Text)
impuesto = 0.07 * Val(ttotalingresos.Text)

descuento = essalud + snp + impuesto


ttotaldescuento.Text = descuento
tessalud.Text = essalud
tsnp.Text = snp
tsolidaridad.Text = impuesto

tneto.Text = Val(ttotaldescuento.Text) - Val(ttotalingresos.Text)

End Sub

Private Sub GroupBox1_Enter(sender As Object, e As EventArgs) Handles


GroupBox1.Enter
Me.cbcategoria.Text = Val(tnormales.Text)
Me.cbcategoria.Text = Val(textras.Text)
'variables para la hora x cada item
maestro = 4
tnormales.Text = maestro

maestro = 5
textras.Text = maestro

oficial = 3.5
tnormales.Text = oficial

oficial = 4
textras.Text = oficial

peon = 3
tnormales.Text = peon

peon = 3.5
textras.Text = peon

End Sub

Private Sub bnuevo_Click(sender As Object, e As EventArgs) Handles


bnuevo.Click
Me.cbcategoria.Text = ""
Me.tnormales.Text = ""
Me.textras.Text = ""
Me.tnor.Text = ""
Me.ttex.Text = ""
Me.tessalud.Text = ""
Me.tsnp.Text = ""
Me.tsolidaridad.Text = ""
Me.ttotalingresos.Text = ""
Me.ttotaldescuento.Text = ""
Me.tneto.Text = ""
Me.tneto.Focus()
End Sub

Private Sub bcancelar_Click(sender As Object, e As EventArgs) Handles


bcancelar.Click
End
End Sub
End Class

Anda mungkin juga menyukai