Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo Boxes.
Message
De
09/12/2003 16:57:48
 
 
À
09/12/2003 16:49:35
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Titre:
Divers
Thread ID:
00857406
Message ID:
00857432
Vues:
23
Jim,

I don't see any code for setting the DataSource for the ComboBoxes ... how are you doing that?

~~Bonnie

>Here is some code...
>
>
>    Private Sub setConnections()
>        Dim oTimeTracker As New TimeTrackerClass(True)
>        contimecollection.ConnectionString = oTimeTracker.getconnectionstring()
>        daProjects.SelectCommand.Connection = contimecollection
>        daTasks.SelectCommand.Connection = contimecollection
>        daResources.SelectCommand.Connection = contimecollection
>        daTaskdtl.SelectCommand.Connection = contimecollection
>        daOpCodes.SelectCommand.Connection = contimecollection
>    End Sub
>
>    Private Sub TimeCollection_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
>        setConnections()
>        getProjects()
>        RefreshCombos()
>        getopcodes()
>    End Sub
>
>    Private Sub RefreshCombos()
>        setConnections()
>        getTasks()
>        getResources()
>        getTaskDetails()
>
>    End Sub
>
>    Private Sub getopcodes()
>        daOpCodes.Fill(dsTimeCollection, "opcode")
>    End Sub
>
>    Private Sub getTaskDetails()
>        Try
>            daTaskdtl.SelectCommand.Parameters("@taskhdr_id").Value = cboTasks.SelectedValue
>            daTaskdtl.Fill(dsTimeCollection, "task_detail")
>        Catch exp As Exception
>            MessageBox.Show(exp.Message)
>        End Try
>    End Sub
>
>    Private Sub getResources()
>        daResources.Fill(dsTimeCollection, "resources")
>    End Sub
>
>    Private Sub getTasks()
>        daTasks.SelectCommand.Parameters("@project_id").Value = cboProjects.SelectedValue
>        daTasks.Fill(dsTimeCollection, "task_header")
>    End Sub
>
>    Private Sub getProjects()
>        daProjects.Fill(dsTimeCollection, "Project")
>    End Sub
>
>    Private Sub cboProjects_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboProjects.SelectedIndexChanged
>        RefreshCombos()
>    End Sub
>
>
>>Jim,
>>
>>Post some code ...
>>
>>~~Bonnie
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform