Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VB.net - Macro Substitution
Message
From
08/01/2011 13:47:53
 
 
General information
Forum:
ASP.NET
Category:
LINQ
Environment versions
Environment:
VB 9.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01488984
Message ID:
01495252
Views:
80
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!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform