Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Data Integrity Checking
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01131873
Message ID:
01132614
Vues:
14
Wang Tong,

>2. For the second question, we try to prevent our application from deleting a record if the record is referenced in other child table. For example, there 2 tables, customer and order. Customer table is the parent table. Order table is child table. The relationship is one to many, which means customer can have many orders. If a customer has order record in order table, our application will prevent user from deleting this record. We can do this by using cascade DELETEs or UPDATEs in database. Does MM.Net provide better way of handling this scenario?

Yes...in the business object's HookPreDelete() method you can place code that checks if there are any existing records that would prevent a delete, then abandon the delete if so.

Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform