So I'm new to programming and currently, I'm creating a school project with Visual Basic and .NET, I know that I might either have a problem with formatting or converting or assigning a value(which I don't know how to do) but whatever I try the multiplied result always gives me 0, (Salarybox is the "RichTextBox" I'm using to put the result in)
Private Sub Guna2Button1_Click(sender As Object, e As EventArgs) Handles Guna2Button1.Click
Dim DailyPay As Integer
If empposition.Text = "" Then
MsgBox("Select an Employee")
ElseIf wdays.Text = "" Or Integer.Parse(wdays.Text) > 28 Then
MsgBox("Enter a valid Number of Days")
Else
If empposition.Text = "Receptionist" Then
DailyPay = 1200
ElseIf empposition.Text = "Reception manager" Then
DailyPay = 1500
ElseIf empposition.Text = "House keeping manager" Then
DailyPay = 700
ElseIf empposition.Text = "Bar manager" Then
DailyPay = 1500
ElseIf empposition.Text = "Barman" Then
DailyPay = 850
ElseIf empposition.Text = "Waiter" Then
DailyPay = 550
ElseIf empposition.Text = "Vendor" Then
DailyPay = 800
ElseIf empposition.Text = "Shop manager" Then
DailyPay = 1500
ElseIf empposition.Text = "IT manager" Then
DailyPay = 1500
ElseIf empposition.Text = "Technicien" Then
DailyPay = 1000
ElseIf empposition.Text = "Spa manager" Then
DailyPay = 1200
ElseIf empposition.Text = "Beautician" Then
DailyPay = 800
ElseIf empposition.Text = "Security man" Then
DailyPay = 500
End If
Dim total As Integer = DailyPay * Integer.Parse(wdays.Text)
Salarybox.Text = "Employee ID: " & empid.Text & vbLf & "Employee Name: " & ename.Text & vbLf & "Employee LastName: " & lastname.Text & vbLf & "Position: " & empposition.Text & vbLf & "Worked Days: " & wdays.Text & vbLf & "Daily Salary: " & DailyPay & vbLf & "Total Amount: " & total
End If
End Sub