Beispiel #1
0
        public EventResult Execute(UI.Event evt)
        {
            var result = new EventResult()
            {
                ActionResults = evt
                                .Actions
                                .Select(a => BehaviourSelector.ActionBehaviours[a.ActionType](CurrentUser).Execute(a))
                                .ToList()
            };

            return(result);
        }
Beispiel #2
0
        public UI.Action Make(ActionDefinition definition, DbSearchResponse ticketSet, UI.Event parentNode)
        {
            var action = new UI.Action()
            {
                ActionType = Mapper.Map <UI.ActionType>(definition.ActionType),
                ParentNode = parentNode
            };

            return(action);
        }
Beispiel #3
0
        public UI.Action Make(ActionDefinition definition, DAL.Models.DbSearchResponse ticketSet, UI.Event parentNode)
        {
            var action = new UI.Action()
            {
                Virtual    = true,
                ParentNode = parentNode,
                ActionType = ActionType.GetSectionSettings
            };

            action.Parameters = new List <Parameter>()
            {
                new UI.Parameter()
                {
                    ParameterType = ParameterType.SectionId,
                    ParentNode    = action,
                    Virtual       = true,
                    DefaultValue  = ((SectionDefinition)parentNode.ParentNode.ParentNode.Definition).Id.ToString()
                }
            };

            return(action);
        }
Beispiel #4
0
        public UI.Action Make(ActionDefinition definition, DAL.Models.DbSearchResponse ticketSet, UI.Event parentNode)
        {
            var action = new UI.Action()
            {
                ActionType = Mapper.Map <UI.ActionType>(definition.ActionType),
                ParentNode = parentNode
            };

            var control = parentNode.ParentNode;

            action.DocId = control.DocId;

            if (control.Props.ContainsKey("FieldId"))
            {
                action.Props.Add("FieldId", parentNode.ParentNode.Props["FieldId"]);
            }

            action.Parameters = definition
                                .Parameters
                                .Select(p => BehaviourSelector.ParameterBehaviours[Mapper.Map <UI.ParameterType>(p.ParameterType)](CurrentUser).Make(p, action))
                                .ToList();

            return(action);
        }
Beispiel #5
0
        public UI.Action Make(ActionDefinition definition, DAL.Models.DbSearchResponse ticketSet, UI.Event parentNode)
        {
            var action = new UI.Action()
            {
                ActionType = Mapper.Map <UI.ActionType>(definition.ActionType),
                ParentNode = parentNode
            };

            action.Props.Add("Id", definition.Id);
            action.DocId = parentNode.ParentNode.DocId;

            action.Parameters = definition
                                .Parameters
                                .Select(pDef => BehaviourSelector.ParameterBehaviours[Mapper.Map <UI.ParameterType>(pDef.ParameterType)](CurrentUser).Make(pDef, action))
                                .ToList();

            return(action);
        }
Beispiel #6
0
        public UI.Action Make(ActionDefinition definition, DAL.Models.DbSearchResponse ticketSet, UI.Event parentNode)
        {
            var action = new UI.Action()
            {
                ActionType = ActionType.SearchTicketsWithAutoComplete,
                ParentNode = parentNode
            };

            action.Parameters = definition
                                .Parameters
                                .Select(pDef => BehaviourSelector.ParameterBehaviours[Mapper.Map <UI.ParameterType>(pDef.ParameterType)](CurrentUser).Make(pDef, action))
                                .ToList();

            return(action);
        }
Beispiel #7
0
 public UI.Action Make(ActionDefinition definition, DbSearchResponse ticketSet, UI.Event parentNode)
 {
     throw new NotImplementedException();
 }