0

Hello,

I'm a super newbie at VB and I'm trying to write a very simple math program. The program is supposed to do some arithmetic and display the results, piece of cake. The problem lies in displaying the results. I have no clue how to do it. I went surfing online for the answer before posting here, hopefully this will be the end of the road. Here is what I've done so far:

THANKS!!!

Private Sub Resultados_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Resultados.Click
        Dim nombre As String, seguroSocial As String
        Dim horas As Integer = Val(txtHorasTrabajadas.Text)
        Dim pagoHora As Double = Val(txtPagoPorHora.Text)
        Dim comision As Integer, dss As Integer, dpm As Integer
        Dim salarioBruto As Integer, salarioNeto As Integer

        nombre = txtNombreEmpleado.Text
        seguroSocial = txtNumeroSeguroSocial.Text

        salarioBruto = horas * pagoHora

        If salarioBruto >= 350 Then
            comision = salarioBruto * 0.15
        End If

        If salarioBruto < 350 Then
            comision = salarioBruto * 0.08
        End If

        dss = salarioBruto * 0.07
        dpm = salarioBruto * 0.03

        salarioNeto = salarioBruto + comision - dss - dpm

    End Sub
2
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by Jx_Man
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.