Public Class Private Sub Byval As Byval As Handles Dim As Integer
The document contains code for a form that calculates an employee's total salary based on their base salary and years of experience. It gets the employee's salary and years from text boxes, calculates the new salary amount by adding a percentage bonus based on years, and displays the total in a label. It also includes code to clear the form fields and close the form.
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
30 views
Public Class Private Sub Byval As Byval As Handles Dim As Integer
The document contains code for a form that calculates an employee's total salary based on their base salary and years of experience. It gets the employee's salary and years from text boxes, calculates the new salary amount by adding a percentage bonus based on years, and displays the total in a label. It also includes code to clear the form fields and close the form.
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3
Public Class Form1
Private Sub BTOCAMBIAR_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles BTOCALCULAR.Click Dim SALARIO, ANTIGUEDAD, TOTAL As Integer SALARIO = Val(TXTSALARIO.Text) ANTIGUEDAD = Val(TXTANTIGUEDAD.Text) Select Case ANTIGUEDAD Case Is > 1 TOTAL = ((SALARIO * 5) / 100) + SALARIO LBLTOTAL.Text = " SU SALARIO ES DE " & TOTAL Case 1, 2 TOTAL = ((SALARIO * 7) / 100) + SALARIO LBLSALARIO.Text = " SU SALARIO ES DE" & TOTAL Case 5 Or 10 TOTAL = ((SALARIO * 15) / 100) + SALARIO LBLSALARIO.Text = " SU SALARIO ES DE" & TOTAL Case Is < 10 TOTAL = ((SALARIO * 20) / 100) + SALARIO LBLSALARIO.Text = " SU SALARIO ES DE" & TOTAL End Select End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles LBLLIMPIAR.Click TXTANTIGUEDAD.Text = "" TXTSALARIO.Text = "" LBLTOTAL.Text = "" End Sub
Private Sub BTOSALIR_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles BTOSALIR.Click End End Sub End Class Public Class Form1
Private Sub BTOCAMBIAR_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles BTOCALCULAR.Click Dim SALARIO, ANTIGUEDAD, TOTAL As Integer SALARIO = Val(TXTSALARIO.Text) ANTIGUEDAD = Val(TXTANTIGUEDAD.Text) Select Case ANTIGUEDAD Case Is > 1 TOTAL = ((SALARIO * 5) / 100) + SALARIO LBLTOTAL.Text = " SU SALARIO ES DE " & TOTAL Case 1, 2 TOTAL = ((SALARIO * 7) / 100) + SALARIO LBLSALARIO.Text = " SU SALARIO ES DE" & TOTAL Case 5 Or 10 TOTAL = ((SALARIO * 15) / 100) + SALARIO LBLSALARIO.Text = " SU SALARIO ES DE" & TOTAL Case Is < 10 TOTAL = ((SALARIO * 20) / 100) + SALARIO LBLSALARIO.Text = " SU SALARIO ES DE" & TOTAL End Select End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles LBLLIMPIAR.Click TXTANTIGUEDAD.Text = "" TXTSALARIO.Text = "" LBLTOTAL.Text = "" End Sub
Private Sub BTOSALIR_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles BTOSALIR.Click End End Sub End Class Public Class Form1
Private Sub BTOCAMBIAR_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles BTOCALCULAR.Click Dim SALARIO, ANTIGUEDAD, TOTAL As Integer SALARIO = Val(TXTSALARIO.Text) ANTIGUEDAD = Val(TXTANTIGUEDAD.Text) Select Case ANTIGUEDAD Case Is > 1 TOTAL = ((SALARIO * 5) / 100) + SALARIO LBLTOTAL.Text = " SU SALARIO ES DE " & TOTAL Case 1, 2 TOTAL = ((SALARIO * 7) / 100) + SALARIO LBLSALARIO.Text = " SU SALARIO ES DE" & TOTAL Case 5 Or 10 TOTAL = ((SALARIO * 15) / 100) + SALARIO LBLSALARIO.Text = " SU SALARIO ES DE" & TOTAL Case Is < 10 TOTAL = ((SALARIO * 20) / 100) + SALARIO LBLSALARIO.Text = " SU SALARIO ES DE" & TOTAL End Select End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles LBLLIMPIAR.Click TXTANTIGUEDAD.Text = "" TXTSALARIO.Text = "" LBLTOTAL.Text = "" End Sub
Private Sub BTOSALIR_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles BTOSALIR.Click End End Sub End Class