Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Business Rule Logic
Message
From
01/03/2005 09:01:13
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Business Rule Logic
Environment versions
Environment:
VB.NET 1.1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
00991524
Message ID:
00991524
Views:
45
I am not able to save a record due to the following Business Rule not passing.
Any thoughts on how I can correct my code to restrict the values to "Square", "RectangleLandscape" or "RectanglePortrait"?

The value being tested, companyLogoShape, gets a database default of "Square" and this value is bound to a combobox that would only permit acceptable values yet I am not ever passing the validation criteria of my Business Rules object detailed below:
' Validate the CompanyLogoShape
    Public Function ValidateCompanyLogoShape(ByVal companyLogoShape As String) As String
        Dim message As String = Nothing

        If companyLogoShape <> "Square" _
            Or companyLogoShape <> "RectangleLandscape" _
            Or companyLogoShape <> "RectanglePortrait" Then
            message = "Logo Shape must be either Square, " _
            + "RectangleLandscape, or RectanglePortrait"
            Me.AddErrorProviderBrokenRule("CompanyLogoShape", message)
        End If
        Return message
    End Function
THANKS
Joe Salvatore, Programmer/Analyst - The Stellar Group
Next
Reply
Map
View

Click here to load this message in the networking platform