Home » » VB.Net Yazılı Sorusu VB.Net(İndirimler ve Kdv’lerin Hesaplanması) örnek

VB.Net Yazılı Sorusu VB.Net(İndirimler ve Kdv’lerin Hesaplanması) örnek

8 label , 7textbox , 2button , 7radiobutton , 2 checkbox ,ekliyoruz.Burada ki programımızın amacı indirimlerle birlikte kdv’leri hesaplamaktır.
soru1
İlk olarak değişkenlerimizi tanımlıyoruz…
Dim sans(10), a, i As Integer
Daha sonra da indirimler için Button2’nin click’ine aşağıdaki kodları yazıyoruz.
If i < 10 Then
i = i + 1
sans(i) = TextBox1.Text
End If

If i = 10 Then
TextBox1.Enabled = False
End If
a = TextBox4.Text + TextBox5.Text
TextBox7.Text = (Val(TextBox5.Text)) + (Val(TextBox5.Text) / 100 * Val(TextBox6.Text))

If CheckBox1.Checked Then
TextBox7.Text = Val(TextBox7.Text) - (Val((TextBox7.Text) / 100) *
End If

If CheckBox2.Checked Then
TextBox7.Text = Val(TextBox7.Text) - (Val((TextBox7.Text) / 100) *
End If

If RadioButton1.Checked And RadioButton3.Checked Then
TextBox7.Text = Val(TextBox7.Text) - (Val((TextBox7.Text) / 100) *
End If

If RadioButton4.Checked Then
TextBox7.Text = Val(TextBox7.Text) - (Val((TextBox7.Text) / 100) *
End If

If RadioButton5.Checked Then
TextBox7.Text = Val(TextBox7.Text) - (Val((TextBox7.Text) / 100) *
End If

If RadioButton6.Checked Then
TextBox7.Text = Val(TextBox7.Text) - (Val((TextBox7.Text) / 100) * End If

If RadioButton7.Checked Then
TextBox7.Text = Val(TextBox7.Text) - (Val((TextBox7.Text) / 100) *
End If

End Sub
Daha sonra da formumuzun load’ına i’yi 0’a eşitliyoruz
i = 0
Son olarakta Şanslı müşteriyi bulmak için button1’in click’ine aşağıdaki kodları yazıyoruz.Burada Randomize kullanıyoruz.
Dim a As Byte
Randomize()
a = Int(Rnd() * 9)
Label8.Text = sans(a)
 
Support : Vaganzi
Copyright © 2013. Visual Studio Kod Bankası - All Rights Reserved
Powered By Vaganzi