Created
June 12, 2018 14:10
-
-
Save joekaslow/a52343d857b541316c7c055ffb1929b2 to your computer and use it in GitHub Desktop.
simple shopping cart in vb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public Class Form1 | |
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click | |
End Sub | |
Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click | |
Const LX As Integer = 100 | |
Const BN As Integer = 500 | |
Const SD As Integer = 200 | |
Const HD As Integer = 80 | |
Const HM As Integer = 300 | |
Const AM As Integer = 160 | |
Dim sum As Integer | |
If CheckBox1.Checked = True Then | |
sum += LX | |
End If | |
If CheckBox2.Checked = True Then | |
sum += BN | |
End If | |
If CheckBox3.Checked = True Then | |
sum += SD | |
End If | |
If CheckBox4.Checked = True Then | |
sum += HD | |
End If | |
If CheckBox5.Checked = True Then | |
sum += HM | |
End If | |
If CheckBox6.Checked = True Then | |
sum += AM | |
End If | |
TextBox1.Text = sum.ToString("c") | |
End Sub | |
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged | |
End Sub | |
Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click | |
End Sub | |
End Class |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I used Microsoft visual basic 2010 express to write the code.
And it was part of my assignment