Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Equivalant of DO command
Message
De
03/12/2006 17:04:20
 
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 2.0
Divers
Thread ID:
01174504
Message ID:
01174508
Vues:
11
This message has been marked as the solution to the initial question of the thread.
>if you already worked on it ,can you give me a small example on how to do this please ?
    ' expO1 Data provider
    Private Function ProcessTaskQuery(ByVal toDataProvider As Framework.Framework.Data) As Boolean
        Dim lcClass As String = ""
        Dim lcMethod As String = ""
        Dim lnCounter As Integer = 0
        Dim loClass As Type = Nothing
        Dim loClassMethodInfo As System.Reflection.MethodInfo = Nothing
        Dim loClassObject As Object = Nothing
        Dim loClassType As Type = Nothing
        Dim loParameterClass(1) As Object
        Dim loParameterMethod(0) As Object
        Dim loRow As DataRow
        loParameterClass(0) = oApp
        loParameterClass(1) = Me
        loParameterMethod(0) = False
        For lnCounter = 0 To toDataProvider.nCount - 1
            loRow = toDataProvider.oDataSet.Tables("Temp").Rows(lnCounter)
            Status.Text = "Processing " + Trim(loRow("Title")) + "..."
            lcClass = Trim(loRow("Class"))
            lcMethod = Trim(loRow("Method"))
            Try
                loClass = Type.GetType("Robot." + lcClass)
                loClassObject = Activator.CreateInstance(loClass, loParameterClass)
                loClassType = loClassObject.GetType()
                loClassMethodInfo = loClassType.GetMethod(lcMethod)
                loClassMethodInfo.Invoke(loClassObject, loParameterMethod)
            Catch loError As Exception
                oApp.ErrorSetup(loError)
                Return False
            End Try
        Next
        Return True
    End Function
This one scans all rows and get its class and method from it. With that, you should be able to find your way.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform