Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BusinessRules between different BOs
Message
De
05/10/2010 08:15:52
 
 
À
04/10/2010 13:58:45
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01483404
Message ID:
01483950
Vues:
25
>>Hi,
>>
>>I may have asked this before, my apologies if I have, but I can't work out how to do this.
>>
>>I have a Receipt BO and a ReceiptDetails BO which is a child of the Receipt BO. For data entry validation, the user has to enter a total amount received at the Receipt BO level and then the sum of the amounts entered at the Receipt Detail BO level must equal the Receipt BO's total amount received.
>>
>>How should I approach writing such a Business Rule?
>>
>>I guess it should be at the Receipt BO level, but how would I refer to the child BO to sum all the amounts?
>
>Frank,
>
>You could do as Bob suggested by passing the child dataset into your Reciept business object. On the other hand, since this is not during a save it really is just form level validation and you could keep a running total in a form variable to continue matching against. Don't let them save until there is a balance if you don't want to. Unless you are going to check this at the save which would make sense, then return a broken rule if the two are not in balance.
>
>Passing in the *proposed* child dataset may depend on where it is. Do you have that in a grid?
>Tim

Hi Tim,

yes, the child dataset is in a grid. I want to check this at the business rule level.
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