vb.net - Total Amount is always zero -


my interface this. (the numbers prices)

enter image description here

inside frame "t-shirt" radio button has code:

dim num1 integer       num1 = [price] 

in frame pants put code:

dim num2 integer      num2 = [price] 

so process..

ex. when click small in tshirt frame , large in pants frame add , multiply on quantity (textbox).

so put code in total amount (commandbutton):

label3.caption = (num1 + num2) * val(textbox1.text) 

but every time run program, zero(0) on total amount label (label3)..

i don't problem codes.

the num1 , num2 variable aren't accesable button.

public class form1 dim num1, num2 double  private sub radiobutton1_checked num1 = 100 end sub  private sub radiobuttonn2_checked num1 = 150 end sub  private sub radiobutton3_checked num2 = 100 end sub  private sub radiobutton4_checked num2 = 150 end sub 

then button are.


Comments