Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VB.net - Macro Substitution
Message
De
08/01/2011 13:47:53
 
 
À
08/01/2011 05:49:10
Information générale
Forum:
ASP.NET
Catégorie:
LINQ
Versions des environnements
Environment:
VB 9.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01488984
Message ID:
01495252
Vues:
82
Hello Viv

Thank you for your continued help. I am starting to get seriously lost here - but I am trying to keep up :-)

after adjusting your code to match my field names and other namings like this:
Module SecurityTest
    <System.Runtime.CompilerServices.Extension()> _
    Public Function IncludesAnyOf(ByVal sc As e_SecurityCodes, ByVal DocSecurityValue As e_SecurityCodes) As Boolean
        Dim code As e_SecurityCodes
        For Each code In [Enum].GetValues(GetType(e_SecurityCodes))
            If sc.HasFlag(code) And DocSecurityValue.HasFlag(code) Then
                Return True
            End If
        Next
        Return False
    End Function
End Module

...

        Dim param As e_SecurityCodes = e_SecurityCodes.DMS_Accounting_AP Or e_SecurityCodes.DMS_Client
        Dim result_Match = (From x In result_0 Where x.SecurityCode.IncludesAnyOf(param) Select x).ToList()
I am now getting the following error on the last dim command:
'IncludesAnyOf' is not a member of 'Integer?'
Ofcourse the field x.SecurityCode is integer - so how do you attach a method to that field?
I'll keep trying to get this straight - I miss working with VFP :-)

thanks!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform