Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Business Rule Logic
Message
De
01/03/2005 09:01:13
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Business Rule Logic
Versions des environnements
Environment:
VB.NET 1.1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
00991524
Message ID:
00991524
Vues:
44
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform