コード例 #1
0
 public void ObjectChangedExecute(object sender, ObjectChangedEventArgs e)
 {
     if ((View != null))
     {
         XafBootstrapObjectChangedControllerHelper.Checker().SetModified(View.ObjectSpace);
     }
 }
コード例 #2
0
 public void ObjectSpaceRemoveChanges(object sender, EventArgs e)
 {
     WebWindow.CurrentRequestWindow.RegisterStartupScript("WindowDataChanged", " window.DataChanged = false;", true);
     if (View != null)
     {
         XafBootstrapObjectChangedControllerHelper.Checker().ClearOS(View.ObjectSpace);
     }
 }
コード例 #3
0
 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();
 }
コード例 #4
0
 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);
     }
 }