Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
HookPreSave not hooked with child/related save?
Message
From
13/08/2008 12:07:30
 
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01338239
Message ID:
01338571
Views:
12
>>just wondering if anyone could confirm the HookPreSave works when saving a child record. I have a HookPreSave(DataTable dt) in my childobject.partial,
>
>Can you explain me how it works for the parent ?
>
>For what I know HookPreSave(mmBusinessObject bizObj, string tableName) is a method of mmBusinessForm and HookPreSave(mmBaseBusinessObject bizObj) is from mmBusinessBaseForm... there are no HookPreSave(DataTable dt) as I know ?
>
>So no HookPreSave does exist in the BO, how can you then have it in the childBO.partial ?

Hi Maurizio,

hmm, might be a version change issue. The 3.5 docs say little about it, from 2.4 docs I see:
Using Business Object Hook Methods
...
HookPreSave
Hook method in which developers can place code to be executed before a data table is saved. If this method returns false, the save is aborted.


protected virtual bool HookPreSave(DataTable dt)
Protected Overridable Function HookPreSave(dt As DataTable) As Boolean
I use it to update lastuser and lastupdate fields when updating the table behind the object.

-Larry
Previous
Reply
Map
View

Click here to load this message in the networking platform