Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Empty DataSet During CheckRules
Message
De
23/08/2012 12:41:01
 
 
À
23/08/2012 12:11:59
Steven Jones
Black Tie Enterprises
Floride, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01539439
Message ID:
01551202
Vues:
48
>Just guessing here, but are you adding multiple records with:
>> this.oPolicy.NewEntity();
>> this.oPolicy.GetPolicyByPolicyHeaderFK(oPolicyHeaderEntity.PolicyHeaderPK);
>
>The NewEntiy() would add one, and then your GetPolicy would get one or more.
>

Thanks, that might be it!


>>Hi,
>>
>>I'm slowly getting back into my MM.NET, ASP.NET, C# application which has been left by the wayside for about a year.
>>
>>I have a business object process that runs through all the active Insurance policies does some checks and changes some values if necessary. When I try to save any policy that has been changed I am getting rule validations breaking where they should not be. In my debugging I can see that the rules of my oPolicy object are failing. oPolicy is a child of oPolicyHeader. When the CheckRules is called the dataset for oPolicy has two records in it and only a couple fields populated. However, just prior to that, the oPolicy entity shows the correct values. What I can't work out is why this dataset has two records (in some cases there may be more than one, but in this case there should only be one) and why only some of the fields are populated.
>>
>>Here is my code:
>>
>>
            this.oPolicyHeader.GetEmptyDataSet();
>>            this.oPolicyHeader.NewEntity(); 
>>            this.oPolicyHeader.GetPolicyHeaderByPolicyHeaderPK(oPolicyHeaderEntity.PolicyHeaderPK);
>>
>>            this.oPolicy = new Policy();
>>            this.oPolicy.GetEmptyDataSet();
>>            this.oPolicy.NewEntity(); 
>>            this.oPolicy.GetPolicyByPolicyHeaderFK(oPolicyHeaderEntity.PolicyHeaderPK);
>>
>>some processing code goes here
>>
>>                mmSaveDataResult result = this.oPolicyHeader.SaveEntity();
>>
>>How do I debug this? Or can anyone spot what I am doing wrong?
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform