AfterSave event


Author
Message
Chan
Chan
Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
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

Paul Chase
Paul Chase
Advanced StrataFrame User (594 reputation)Advanced StrataFrame User (594 reputation)Advanced StrataFrame User (594 reputation)Advanced StrataFrame User (594 reputation)Advanced StrataFrame User (594 reputation)Advanced StrataFrame User (594 reputation)Advanced StrataFrame User (594 reputation)Advanced StrataFrame User (594 reputation)Advanced StrataFrame User (594 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
Chan,

Why not just use the save result?

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

do whatever

Chan
Chan
Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
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

Chan
Chan
Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
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

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search