public static NodeAction CopyDokladAction(NodeActionType type, Types.Reg.TypBiznisEntityNastavView typBe, NodeActionIcons nodeActionIcon, bool separator, string additionalParam = null) { return(new NodeAction(type) { SelectionMode = PfeSelection.Multi, Url = $"/office/crm/CopyDoklad?CielTyp=" + typBe.C_TypBiznisEntity_Id + (additionalParam ?? string.Empty), GroupType = type == NodeActionType.CopyTo ? "PostRequest" : "", IdField = "D_BiznisEntita_Id", Caption = type == NodeActionType.CopyToFA ? "Export - vyúčtovacia faktúra" : "Export - " + typBe.TypDokladu.ToLower(), ActionIcon = nodeActionIcon, Separator = (separator ? "-" : string.Empty) }); }
/// <summary> /// Initializes a new instance of the <see cref="NodeActionIconAttribute" /> class. /// </summary> /// <param name="icon">The node action icon.</param> public NodeActionIconAttribute(NodeActionIcons icon) { this.Icon = icon; }
/// <summary> /// Generuje akcie v submenu do MenuButtonsAll /// </summary> /// <returns></returns> public static List <NodeAction> AddMenuButtonsAll(this List <NodeAction> list, NodeActionType type, Type actionType, string folderCaption = "Add", string buttonCaption = "", PfeSelection pfeSelection = PfeSelection.Single, NodeActionIcons actionIcon = NodeActionIcons.Default, string url = null) { var nodeAction = new NodeAction(type, actionType, buttonCaption) { SelectionMode = pfeSelection }; if (!string.IsNullOrEmpty(url)) { nodeAction.Url = url; } if (list.Where(f => f.ActionIcon == NodeActionIcons.Plus).Count() == 0) { NodeAction na; na = new NodeAction(NodeActionType.MenuButtonsAll) { ActionIcon = (folderCaption == "Add") ? NodeActionIcons.Plus : actionIcon, Caption = (folderCaption == "Add") ? "" : folderCaption, //Už nedávam na podgridy popis "Pridať". stačí ikonka MenuButtons = new List <NodeAction>() { nodeAction } }; list.Insert(0, na); } else { list.Where(f => f.ActionIcon == NodeActionIcons.Plus).First().MenuButtons.Add(nodeAction); }; return(list); }