1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| objConnection = _clClassDb.GetConnection()
' Ouverture de la connexion
objConnection.Open()
objDataSet.Reset()
_clClassDb.ChargerDataset(objDataSet, LaTable, AdVol, "SELECT " & LaTable & ".* FROM " & LaTable, " ORDER BY NomCie")
' Create a BindingSource for the Customers data.
Me.nwBindingSource = New System.Windows.Forms.BindingSource()
Me.nwBindingSource.DataMember = LaTable '"Customers"
Me.nwBindingSource.DataSource = Me.objDataSet
Me.LstViewCie.ItemsSource = Me.nwBindingSource
'Me.MainGrid.DataContext = Me.nwBindingSource
Dim I_Module As New ArrayList()
I_Module.Add(New Etat("Emprunts", "1"))
I_Module.Add(New Etat("Ventes", "2"))
CboModule.DataSource = I_Module
Cbomodule.DisplayMember = "LongName"
Cbomodule.ValueMember = "ShortName"
Me.CboModule.DataBindings.Add("Selectedvalue", nwBindingSource, "NoModule", True)
Dim cv As BindingListCollectionView = CollectionViewSource.GetDefaultView(Me.nwBindingSource)
AddHandler cv.CurrentChanged, AddressOf WPF_CurrentChanged |