Je voudrais d'abord metre la Première colonnes qu'une seul fois, le Nom, Numero Prix ect., Directement dans la properties, Où doije metre ma liste, pour l'instant pour chaque article, je recois le nom également, ensuite , comment pui-je retourné aux début avec le retour de ma routine? La Marque Main: n'est pas d'eclaré?? voilà mon Code

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
   Private Sub btEntree_Click(sender As System.Object, e As System.EventArgs) Handles btEntree.Click
      Dim MyArticleListe1 As ColumnHeader = New ColumnHeader         ' Nr de `l'article
      Dim MyArticleListe2 As ColumnHeader = New ColumnHeader         ' Nom de l'article
      Dim MyArticleListe3 As ColumnHeader = New ColumnHeader         ' Prix de Vente
      Dim MyArticleListe4 As ColumnHeader = New ColumnHeader         ' Article en Sock
      Dim MyArticleListe5 As ColumnHeader = New ColumnHeader         ' Prix d'achat
      Dim MyArticleListe6 As ColumnHeader = New ColumnHeader         ' Nom du fournisseur
      Dim MyArticleListe7 As ColumnHeader = New ColumnHeader         ' Nr du Fournisseur
 
      Dim Main As Label
 
      Dim ArtListe() As ColumnHeader = {MyArticleListe1, MyArticleListe2, MyArticleListe3, MyArticleListe4, MyArticleListe5, MyArticleListe6, MyArticleListe7}
      Dim aItem As ListViewItem
 
Main:
      lvAliste.Columns.AddRange(ArtListe)
      lvAliste.View = View.Details
 
      MyArticleListe1.Text = "Nr Article"                              '#
      MyArticleListe1.Width = 60                                        '#  colonne "Nr"
      MyArticleListe1.TextAlign = HorizontalAlignment.Center
 
 
      MyArticleListe2.Text = "Article Nom"                              '#
      MyArticleListe2.Width = 60                                        '#  colonne "Nom"
      MyArticleListe2.TextAlign = HorizontalAlignment.Center
 
 
      MyArticleListe3.Text = "Vente"                              '#
      MyArticleListe3.Width = 60                                        '# Prix de vente
      MyArticleListe3.TextAlign = HorizontalAlignment.Center
 
 
      MyArticleListe4.Text = "Stock"                              '#
      MyArticleListe4.Width = 60                                        '#  première colonne "Nr"
      MyArticleListe4.TextAlign = HorizontalAlignment.Center
 
 
      MyArticleListe5.Text = "Achat"                              '#
      MyArticleListe5.Width = 60                                        '#  Prix d'achat
      MyArticleListe5.TextAlign = HorizontalAlignment.Center
 
 
      MyArticleListe6.Text = "Nom Fournis."                              '#
      MyArticleListe6.Width = 60                                        '#  Nom du fournisseur
      MyArticleListe6.TextAlign = HorizontalAlignment.Center
 
 
      MyArticleListe7.Text = "Nr Fournis."                              '#
      MyArticleListe7.Width = 60                                        '#  Numero du Fournisseur
      MyArticleListe7.TextAlign = HorizontalAlignment.Center
 
      '#################################
      '#          Afficher
      '#################################
      lvAliste.View = View.Details
 
 
      aItem = lvAliste.Items.Add(tbNrArticle.Text)
 
      aItem.SubItems.Add(tbArticleNom.Text)
      If tbArticleNom.Text = ("") Then
         Dialog()
      End If
      aItem.SubItems.Add(tbArticleVente.Text)
      If tbArticleVente.Text = ("") Then
         Dialog()
      End If
      aItem.SubItems.Add(tbArticleStock.Text)
      If tbArticleStock.Text = ("") Then
         Dialog()
      End If
      aItem.SubItems.Add(tbArticleAchat.Text)
      If tbArticleAchat.Text = ("") Then
         Dialog()
      End If
      aItem.SubItems.Add(tbFounisseurNom.Text)
      If tbFounisseurNom.Text = ("") Then
         Dialog()
      End If
      aItem.SubItems.Add(tbFournisseurNr.Text)
      If tbFournisseurNr.Text = ("") Then
         Dialog()
      End If
 
 
   End Sub
   '###########################################################
   '#               Message Dialoge Routine
   '###########################################################
 
   Public Function Dialog() As String
 
      Dialog = MessageBox.Show("remplisser toutes les Cases")
      GoTo Main
   End Function