Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where to check for duplicates before posting a new recor
Message
De
19/05/2005 08:24:39
 
 
À
19/05/2005 00:37:54
Dave Porter
Medical Systematics, Inc.
Merced, Californie, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01015688
Message ID:
01015786
Vues:
29
Dave:

We are checking for duplicates in the business object for the table you're checking. To do this, you would need to create a rule to check for duplicates, and call it from the CheckRulesHook(DataSet ds, string tableName) method. Here is a sample:

public override bool CheckRulesHook(DataSet ds, string tableName)
{
if (ds != null)
{
DataRow dr = ds.Tables[tableName].Rows[0]; this.CheckForDuplicateStatusCode(dr["sa_status"].ToString(),(int)dr["pk_spstatus"]);
}
return this.ErrorProviderBrokenRuleCount == 0;
}

If this example, you would need to create a method called CheckForDuplicateStatusCode. This is where you would put your code to check for duplicate records.

Hope that helps.

Lori S.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform