Exemplo n.º 1
0
        void OnRowRemoving(CancellableRowChange <ItemAttributeLookupView> modelItem)
        {
            // set the Selected Item Attribute for use later
            SelectedItemAttributeLookup = modelItem.Item;
            var deleteItem = modelItem;

            _GridSettings.DeleteConfirmation.ShowModal("Delete confirmation", $"Are you sure you want to delete: {deleteItem.Item.AttributeName}?", SelectedItemAttributeLookup.HasWooAttributeMap);  //,"Delete","Cancel"); - passed in on init
        }
Exemplo n.º 2
0
        internal bool IsSafeToProceed(Action <CancellableRowChange <TItem> > handler, TItem item)
        {
            if (handler != null)
            {
                var args = new CancellableRowChange <TItem>(item);

                foreach (Action <CancellableRowChange <TItem> > subHandler in handler?.GetInvocationList())
                {
                    subHandler(args);

                    if (args.Cancel)
                    {
                        return(false);
                    }
                }
            }

            return(true);
        }