I have this code thus far figured out:
Expand|Select|Wrap|Line Numbers
- Public Class Frmweeklypaycalculator
- Private Sub btnweeklypay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnweeklypay.Click
- ' This event handler is executed when the user clicks the
- ' Weekly Pay button. It calculates and displays the
- ' amount to be paid (number of minutes times hourly rate).
- Dim strTotalMinutesWorked As String
- Dim strTotalHourlyRate As String
- Dim intTotalMinutesWorked As Integer
- Dim intTotalHoursWorked As Integer
- Dim decTotalWeeklyPay As Decimal
- strTotalMinutesWorked = Me.Txtminworked.Text
- strTotalHourlyRate = Me.Txthourpay.Text
- intTotalMinutesWorked = Convert.ToInt32(strTotalMinutesWorked)
- intTotalHoursWorked = CInt((intTotalMinutesWorked / 60))
- decTotalWeeklyPay = CDec(intTotalHoursWorked * CDbl(strTotalHourlyRate))
- Me.Lblhrsworkednum.Text = intTotalHoursWorked.ToString("c")
- Me.Lblweeklypaynum.Text = decTotalWeeklyPay.ToString("c")
Now what I want to do is get rid of the dollar signs for Hours Worked and instead of it saying 2.00, just say 2. Also since I put it 125 minutes I would like it to say 5 next to Minutes worked instead of 999. Then end up with the correct amount to be paid. Sorry for my extremely poor explanation, I barely grasp the concept of what I'm saying. But any help would be greatly appreciated.