private void actionRestoreData_CustomizePopupWindowParams(object sender, CustomizePopupWindowParamsEventArgs e)
        {
            IObjectSpace          space = Application.CreateObjectSpace();
            RestoreDataParameters p     = space.CreateObject <RestoreDataParameters>();

            e.View = Application.CreateDetailView(space, p);
            (e.View as DetailView).ViewEditMode = ViewEditMode.Edit;
        }
        private void actionRestoreData_Execute(object sender, PopupWindowShowActionExecuteEventArgs e)
        {
            RestoreDataParameters p      = e.PopupWindowViewCurrentObject as RestoreDataParameters;
            DetailView            view   = e.PopupWindowView as DetailView;
            ListPropertyEditor    editor = view.FindItem("DeletedItems") as ListPropertyEditor;

            IObjectSpace space = Application.CreateObjectSpace();

            using (AuditTrailRestoreHelper helper = new AuditTrailRestoreHelper(space))
            {
                foreach (RestoreItemDetails details in editor.ListView.SelectedObjects)
                {
                    helper.RestoreObject(space.GetObject <AuditDataItemPersistent>(details.AuditTrailItem));
                }

                helper.MarkAsRestored();
                space.CommitChanges();
            }
        }