L
ludasky
Guest
hi,
i would like to Display the outcome in a labelBox but i cant get it to work for some reason using displayInfo(), anyone got any idea?it says displayInfo is not declared
Option Explicit On
Option Strict On
Public Class Form1
' declare Varibles
Private aSalariedEmployee As SalariedEmployee
Private aCommissionEmployee As CommissionEmployee
Private anEmployee As Employee
Private weeklyPay As Decimal = 0
Private salary As Decimal = 0
Private sales As Decimal = 0
Private salaryIsConverted As Boolean = False
Private salesIsConverted As Boolean = False
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'instantiate objects
If RadioButton1.Checked Then
salaryIsConverted = Decimal.TryParse(MaskedTextBox1.Text, salary)
aSalariedEmployee = New SalariedEmployee(TextBox1.Text, TextBox2.Text, salary)
weeklyPay = aSalariedEmployee.AnnualSalary / 52
'Cast aSalariedEmployee as Employee
anEmployee = aSalariedEmployee
displayInfo()
i would like to Display the outcome in a labelBox but i cant get it to work for some reason using displayInfo(), anyone got any idea?it says displayInfo is not declared
Option Explicit On
Option Strict On
Public Class Form1
' declare Varibles
Private aSalariedEmployee As SalariedEmployee
Private aCommissionEmployee As CommissionEmployee
Private anEmployee As Employee
Private weeklyPay As Decimal = 0
Private salary As Decimal = 0
Private sales As Decimal = 0
Private salaryIsConverted As Boolean = False
Private salesIsConverted As Boolean = False
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'instantiate objects
If RadioButton1.Checked Then
salaryIsConverted = Decimal.TryParse(MaskedTextBox1.Text, salary)
aSalariedEmployee = New SalariedEmployee(TextBox1.Text, TextBox2.Text, salary)
weeklyPay = aSalariedEmployee.AnnualSalary / 52
'Cast aSalariedEmployee as Employee
anEmployee = aSalariedEmployee
displayInfo()

