StrataFrame Forum

AfterSave event

http://forum.strataframe.net/Topic8689.aspx

By Chan - 5/6/2007

Hi,

I need to be notified when BO.Save() is successful. I tried to bind to BO.AfterSave() event but this event will be raised once the BO saved data successfully, even though its child/parent BO.save() is not yet called.

Which event will be fired after BO.Save(), including all dependencies BO?

Thank you

By Paul Chase - 5/6/2007

Chan,

Why not just use the save result?

if bo.save() = MicroFour.StrataFrame.Data.SaveUndoResult.Success

do whatever

By Chan - 5/6/2007

Hi,

Actually I am writing a class that similar with BusinessLinkManager but mine is one to one relationship. This class will accept sourceBO and BusinessLayerCollection as parameter. It bind events like aftersave, afterundo and etc.

For example, when SourceBO.AfterAddNew() event fired, this class will call BOs.Add() method in BusinessLayerCollection so that these BOs "look like" single table. I know I can use view to accomplish this, but I don't prefer to write INSTEAD OF trigger because it is slower.

Thank you

By Chan - 5/6/2007

Hi,

Sorry to answer your question. I need to execute some action and set some flags once SourceBO.Save() is successfully. I want to encapsulate all these actions in my class therefore I cant check for saveresult and do something in form.

Thank you