コード例 #1
0
        public override void Execute()
        {
            base.Execute();

            _databaseEntity.RevertToDatabaseState();
            Publish(_databaseEntity);
        }
コード例 #2
0
ファイル: ObjectSaverButton.cs プロジェクト: HicServices/RDMP
        public void Undo()
        {
            var changes = _o.HasLocalChanges();

            //no changes anyway user must have made a change and then unapplyed it
            if (changes.Evaluation != ChangeDescription.DatabaseCopyDifferent)
            {
                return;
            }

            //reset to the database state
            _o.RevertToDatabaseState();

            //publish that the object has changed
            _activator.RefreshBus.Publish(this, new RefreshObjectEventArgs(_o));

            //show the redo image
            SetReadyToRedo(changes);

            //publish probably disabled us
            Enable(true);
        }