DESCRIPTION:
CODEING:
Design a form which has Annual salary with income tax facilities. If monthly salary entered then calculate annual salary. According to this income tax as per below conditions.
Rs.0 - Rs.50000 - No tax
Rs.50000 - Rs.60000 - 10% of annual income
Rs.60000 - Rs.150000 - 20% of annual income
More than Rs.150000 - 30% of annual income
Also print net annual salary after the deduction from tax in label.
PROPERTIES:
Rs.0 - Rs.50000 - No tax
Rs.50000 - Rs.60000 - 10% of annual income
Rs.60000 - Rs.150000 - 20% of annual income
More than Rs.150000 - 30% of annual income
Also print net annual salary after the deduction from tax in label.
PROPERTIES:
Label1 | |
Text | Enter Annual Salary |
Button1 | |
Text | CLEAR |
CheckBox1 | |
Text | Monthly Salary |
Public Class Form1
Dim i As Single
Dim s As Double
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles TextBox1.TextChanged, CheckBox1.CheckedChanged
If CheckBox1.Checked = True Then
s = Val(TextBox1.Text) * 12
Else
s = Val(TextBox1.Text)
End If
If s <= 50000 Then
Label1.Text = "Net Annual Salary:" & s & vbNewLine & "Income Tax:0" & vbNewLine & "Annual Salary:" & s
ElseIf s > 50000 And s <= 60000 Then
i = s * 0.1
Label1.Text = "Net Annual Salary:" & s - i & vbNewLine & "Income Tax(10%) :" & i & vbNewLine & "Annual Salary:" & s
ElseIf s > 60000 And s <= 150000 Then
i = s * 0.2
Label1.Text = "Net Annual Salary:" & s - i & vbNewLine & "Income Tax(20%) :" & i & vbNewLine & "Annual Salary:" & s
ElseIf s > 150000 Then
i = s * 0.3
Label1.Text = "Net Annual Salary:" & s - i & vbNewLine & "Income Tax(30%) :" & i & vbNewLine & "Annual Salary:" & s
Else
Label1.Text = "Enter Monthly Salary"
TextBox1.Text = ""
End If
End Sub
Private Sub Button1_Click_1(sender As Object, e As EventArgs) Handles Button1.Click
TextBox1.Text = ""
End Sub
End Class
DESIGNING:Dim i As Single
Dim s As Double
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles TextBox1.TextChanged, CheckBox1.CheckedChanged
If CheckBox1.Checked = True Then
s = Val(TextBox1.Text) * 12
Else
s = Val(TextBox1.Text)
End If
If s <= 50000 Then
Label1.Text = "Net Annual Salary:" & s & vbNewLine & "Income Tax:0" & vbNewLine & "Annual Salary:" & s
ElseIf s > 50000 And s <= 60000 Then
i = s * 0.1
Label1.Text = "Net Annual Salary:" & s - i & vbNewLine & "Income Tax(10%) :" & i & vbNewLine & "Annual Salary:" & s
ElseIf s > 60000 And s <= 150000 Then
i = s * 0.2
Label1.Text = "Net Annual Salary:" & s - i & vbNewLine & "Income Tax(20%) :" & i & vbNewLine & "Annual Salary:" & s
ElseIf s > 150000 Then
i = s * 0.3
Label1.Text = "Net Annual Salary:" & s - i & vbNewLine & "Income Tax(30%) :" & i & vbNewLine & "Annual Salary:" & s
Else
Label1.Text = "Enter Monthly Salary"
TextBox1.Text = ""
End If
End Sub
Private Sub Button1_Click_1(sender As Object, e As EventArgs) Handles Button1.Click
TextBox1.Text = ""
End Sub
End Class
Comments
Post a Comment