protected override void ExecuteAction(ObjectBuilderContext context, BaseItemAction action, dynamic metadata)
 {
     ViewHelper.ShowView(null,
                         () => context.Build(action.GetView(), metadata.View),
                         childDataSource => OnInitializeChildView(childDataSource),
                         childDataSource => OnAcceptedChildView(action, childDataSource));
 }
Ejemplo n.º 2
0
        protected override void ExecuteAction(ObjectBuilderContext context, BaseItemAction action, dynamic metadata)
        {
            var selectedItem = action.GetSelectedItem();

            if (selectedItem != null)
            {
                ViewHelper.ShowView(selectedItem,
                                    () => context.Build(action.GetView(), metadata.View),
                                    childDataSource => OnInitializeChildView(childDataSource, selectedItem),
                                    childDataSource => OnAcceptedChildView(action, childDataSource, selectedItem));
            }
        }
Ejemplo n.º 3
0
        protected override void ExecuteAction(ObjectBuilderContext context, BaseItemAction action, dynamic metadata)
        {
            var selectedItem = action.GetSelectedItem();

            if (selectedItem != null && (Convert.ToBoolean(metadata.Accept) == false
                                         ||
                                         MessageBox.Show(Resources.DeleteItemActionQuestion, action.GetView().GetText(),
                                                         MessageBoxButton.YesNo, MessageBoxImage.Question,
                                                         MessageBoxResult.No) == MessageBoxResult.Yes))
            {
                action.RemoveItem(selectedItem);
            }
        }