public void ObjectChangedExecute(object sender, ObjectChangedEventArgs e) { if ((View != null)) { XafBootstrapObjectChangedControllerHelper.Checker().SetModified(View.ObjectSpace); } }
public void ObjectSpaceRemoveChanges(object sender, EventArgs e) { WebWindow.CurrentRequestWindow.RegisterStartupScript("WindowDataChanged", " window.DataChanged = false;", true); if (View != null) { XafBootstrapObjectChangedControllerHelper.Checker().ClearOS(View.ObjectSpace); } }
protected override void OnActivated() { XafBootstrapObjectChangedControllerHelper.Checker().ListClear(); View.ObjectSpace.ObjectChanged += ObjectChangedExecute; View.ObjectSpace.Committed += ObjectSpaceRemoveChanges; View.ObjectSpace.RollingBack += ObjectSpaceRemoveChanges; View.ObjectSpace.Refreshing += ObjectSpaceRemoveChanges; base.OnActivated(); }
protected override void OnViewControlsCreated() { base.OnViewControlsCreated(); if (XafBootstrapObjectChangedControllerHelper.Checker().CheckModified(View.ObjectSpace)) { WebWindow.CurrentRequestWindow.RegisterStartupScript("WindowDataChanged", ";window.DataChanged = true;", true); } else { WebWindow.CurrentRequestWindow.RegisterStartupScript("WindowDataChanged", ";window.DataChanged = false;", true); } }