Half the problem solved, but now I need,
If GlassRadioButton.Checked = True Then
, well here's where im stuck, I need Glass to get added to a string or something, so it can be called in myAddNew
?
vb.net Code:
"VALUES"
Dim myValue As Integer ' Base value of frames
Dim myValue1 As Integer ' Glass or plastic value
Dim myValue2 As Integer ' Scratch Coating value
Dim myValue3 As Integer ' UV value
Dim totalCost As Integer ' Total value
Dim deposit As Integer ' Deposit value, 20% of total
myValue = 50 'Base value of frames, always 50
If GlassRadioButton.Checked = True Then
myValue1 = 30
ElseIf
PlasticRadioButton.Checked = True Then
myValue1 = 15
End If
If CheckBox1.Checked = True Then
myValue2 = 10
Else
myValue2 = 0
End If
If CheckBox2.Checked = True Then
myValue3 = 15
Else
myValue3 = 0
End If
totalCost = myValue + myValue1 + myValue2 + myValue3 'Gets total by adding all values
deposit = totalCost * 0.2 'Divides total by 0.2 to find the 20% deposit
TextBox1.Text = totalCost 'Displays total
TextBox2.Text = deposit 'Displays deposit
TextBox3.Text = totalCost - deposit 'Subtracts the deposit from total, to find balance
PrintButton.Enabled = True
ViewButton.Enabled = True
myAddNew(8) 'CALLS ADDNEW METHOD WHEN ADD BUTTON IS CLICKED