Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MmType.IsEmpty
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Versions des environnements
Environment:
C# 2.0
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01144991
Message ID:
01147736
Vues:
26
>This is a reference to a dataset created from a business object built by the business layer generator. In the business object, the field is defined as 'int' without the ? but the get statement returns a nullable value. In my statement -- if (!mmType.IsEmpty(pe.parish)) --, the pe is a reference to the entity object. Do I need to create a variable of type int? and test that rather than the dataset field value?

>Are you saying the pe.Parish property is NOT nullable, but it contains a null value? Is it null because you have created a new record?

No, the pe.Parish property is nullable. It is null because the user did not fill in that value. Here's the code from the entity object:
/// <summary>
/// parish
/// </summary>
public int parish
{
     get { return (int)mmType.GetNullableDbValue(this.Row["parish"]); }
     set { this.Row["parish"] = value; }
}
Thanks.

Linda
Linda Harmes
HiBit Technologies, Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform