Hi Samir,
DevForce will raise PropertyChanged on an entity when it´s first loaded only if you set it the event handler in the constructor.
However, this will not work in n-tier because serialization does not use the constructor.
In the PropertyChanged handler you will not be able to detect if the entity is being refetched or rolledback, but you could do it by using the EntityChanged handler instead. It has EntityActions that would help you determine these events:
void mgr_EntityChanged(object sender, EntityChangedEventArgs e) {
if (e.Action == EntityAction.ChangeCurrentAndOriginal || e.Action == EntityAction.ChangeOriginal) {
MessageBox.Show("Refetch");
}
if (e.Action == EntityAction.Rollback) {
MessageBox.Show("RejectChanges");
}
}
Regards,
Silvio.
Edited by sbelini - 18-Jul-2011 at 12:02pm