You are on page 1of 6

Public Class Form1

Dim str(6) As String


Dim itm As ListViewItem
Dim itm2 As ListViewItem
Dim itm3 As ListViewItem
Dim itm4 As ListViewItem
Dim TTC As Integer = 0
Dim TTC1 As Integer = 0
Dim TTC2 As Integer = 0
Dim TTC3 As Integer = 0S
Dim TTC4 As Integer = 0
Dim pf0prt() As String = {"PF0", "robe traditionnelle", "femme", 120}
Dim pf1prt() As String = {"PF1", "caftan", "femme", 113.49}
Dim pf2prt() As String = {"PF3", "robe", "femme", 80}
Dim ph0prt() As String = {"PH0", "polo", "homme", 120.5}
Dim ph1prt() As String = {"PH1", "casquette", "homme", 119.99}
Dim ph2prt() As String = {"PH2", "veste", "homme", 99.99}
Dim ph3prt() As String = {"PH3", "chemise", "homme", 30}

Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs)


Handles ComboBox1.SelectedIndexChanged
Select Case ComboBox1.Text
Case "Homme"
PictureBox1.BackgroundImage = My.Resources.PH0
PictureBox2.BackgroundImage = My.Resources.PH1
PictureBox3.BackgroundImage = My.Resources.PH2
PictureBox4.BackgroundImage = My.Resources.PH3
Case "Femme"
PictureBox1.BackgroundImage = My.Resources.PF0
PictureBox2.BackgroundImage = My.Resources.PF1
PictureBox3.BackgroundImage = My.Resources.PF2
PictureBox4.BackgroundImage = Nothing
End Select
Form4.lblquantite.Text = 1
End Sub

Private Sub PictureBox1_Click(sender As Object, e As EventArgs) Handles


PictureBox1.Click
If ComboBox1.Text = "Homme" Then
Form4.lbl6.Text = ph0prt(0)
Form4.lbl7.Text = ph0prt(1)
Form4.lbl8.Text = ph0prt(2)
Form4.lbl9.Text = ph0prt(3)
Form4.lblst.Text = ph0prt(3)
ElseIf ComboBox1.Text = "Femme" Then
Form4.lbl6.Text = pf1prt(0)
Form4.lbl7.Text = pf1prt(1)
Form4.lbl8.Text = pf1prt(2)
Form4.lbl9.Text = pf1prt(3)
Form4.lblst.Text = pf1prt(3)
End If
Form4.lblquantite.Text = 1
Form4.ShowDialog()
str(0) = Form4.lbl6.Text
str(1) = Form4.lbl7.Text
str(2) = Form4.lbl8.Text
str(3) = Form4.lbl9.Text
str(4) = Form4.lblquantite.Text
str(5) = Form4.lblst.Text
TTC1 += str(5)
itm3 = New ListViewItem(str)
Form3.ListView1.Items.Add(itm3)
End Sub

Private Sub Btnpanier_Click(sender As Object, e As EventArgs) Handles


Btnpanier.Click
TTC = TTC1 + TTC2 + TTC3 + TTC4
Form3.Lbl2.Text = TTC
Form3.ShowDialog()
End Sub

Private Sub PictureBox2_Click(sender As Object, e As EventArgs) Handles


PictureBox2.Click
If ComboBox1.Text = "Homme" Then
Form4.lbl6.Text = ph1prt(0)
Form4.lbl7.Text = ph1prt(1)
Form4.lbl8.Text = ph1prt(2)
Form4.lbl9.Text = ph1prt(3)
Form4.lblst.Text = ph1prt(3)
ElseIf ComboBox1.Text = "Femme" Then
Form4.lbl6.Text = pf0prt(0)
Form4.lbl7.Text = pf0prt(1)
Form4.lbl8.Text = pf0prt(2)
Form4.lbl9.Text = pf0prt(3)
Form4.lblst.Text = pf0prt(3)
End If
Form4.lblquantite.Text = 1
Form4.ShowDialog()
str(0) = Form4.lbl6.Text
str(1) = Form4.lbl7.Text
str(2) = Form4.lbl8.Text
str(3) = Form4.lbl9.Text
str(4) = Form4.lblquantite.Text
str(5) = Form4.lblst.Text
TTC2 += str(5)
itm4 = New ListViewItem(str)
Form3.ListView1.Items.Add(itm4)
End Sub
Private Sub PictureBox3_Click(sender As Object, e As EventArgs) Handles
PictureBox3.Click
If ComboBox1.Text = "Homme" Then
Form4.lbl6.Text = ph2prt(0)
Form4.lbl7.Text = ph2prt(1)
Form4.lbl8.Text = ph2prt(2)
Form4.lbl9.Text = ph2prt(3)
Form4.lblst.Text = ph2prt(3)
ElseIf ComboBox1.Text = "Femme" Then
Form4.lbl6.Text = pf2prt(0)
Form4.lbl7.Text = pf2prt(1)
Form4.lbl8.Text = pf2prt(2)
Form4.lbl9.Text = pf2prt(3)
Form4.lblst.Text = pf2prt(3)
End If
Form4.lblquantite.Text = 1
Form4.ShowDialog()
str(0) = Form4.lbl6.Text
str(1) = Form4.lbl7.Text
str(2) = Form4.lbl8.Text
str(3) = Form4.lbl9.Text
str(4) = Form4.lblquantite.Text
str(5) = Form4.lblst.Text
TTC3 += str(5)
itm2 = New ListViewItem(str)
Form3.ListView1.Items.Add(itm2)
End Sub
Private Sub PictureBox4_Click(sender As Object, e As EventArgs) Handles
PictureBox4.Click
If ComboBox1.Text = "Homme" Then
Form4.lbl6.Text = ph3prt(0)
Form4.lbl7.Text = ph3prt(1)
Form4.lbl8.Text = ph3prt(2)
Form4.lbl9.Text = ph3prt(3)
Form4.lblst.Text = ph3prt(3)
End If
Form4.lblquantite.Text = 1
Form4.ShowDialog()
str(0) = Form4.lbl6.Text
str(1) = Form4.lbl7.Text
str(2) = Form4.lbl8.Text
str(3) = Form4.lbl9.Text
str(4) = Form4.lblquantite.Text
str(5) = Form4.lblst.Text
TTC4 += str(5)
itm = New ListViewItem(str)
Form3.ListView1.Items.Add(itm)
End Sub
End Class
Public Class Form4
Dim inquantité As Integer = 1
Private Sub btn1_Click(sender As Object, e As EventArgs) Handles btn1.Click
If inquantité <> 1 Then
inquantité -= 1
lblquantite.Text = inquantité
lblst.Text = (lbl9.Text) * (inquantité)
End If
End Sub
Private Sub btn2_Click(sender As Object, e As EventArgs) Handles btn2.Click
inquantité += 1
lblquantite.Text = inquantité
lblst.Text = (lbl9.Text) * (inquantité)
End Sub
Private Sub Ferme_Click(sender As Object, e As EventArgs) Handles Ferme.Click
inquantité = 1
Close()
End Sub
End Class
Public Class Form3
Dim selectedItem As ListViewItem
Dim itt As Integer
Private Sub ListView1_SelectedIndexChanged(sender As Object, e As EventArgs)
Handles ListView1.SelectedIndexChanged
itt = ListView1.SelectedItems.Count
If itt > 0 Then
Form4.ShowDialog()
selectedItem = ListView1.SelectedItems(0)
selectedItem.SubItems(0).Text = Form4.lbl6.Text
selectedItem.SubItems(1).Text = Form4.lbl7.Text
selectedItem.SubItems(2).Text = Form4.lbl8.Text
selectedItem.SubItems(3).Text = Form4.lbl9.Text
selectedItem.SubItems(4).Text = Form4.lblquantite.Text
selectedItem.SubItems(5).Text = Form4.lblst.Text
itt = 0
End If
ListView1.HideSelection = True
End Sub
End Class

You might also like