protected void btnSubmit_Click(object sender, EventArgs e) { CalcPremiumClass c1 = new CalcPremiumClass(); int age = int.Parse(txtAge.Text); string gender = txtGender.Text; DisplayAge.Text += age.ToString(); DisplayGender.Text += gender; DisplayPremium.Text += "€" + c1.CalcPremium(age, gender).ToString(); }
public float CheckPremium(int age, string gender) { float actualResult = c1.CalcPremium(age, gender); return(actualResult); }