Ejemplo n.º 1
0
        public JsonResult GetStatusesList(string actionCode, string entityId, int parentEntityId, bool?boundToExternal)
        {
            var result = int.TryParse(entityId, out var idResult) ? BackendActionService.GetStatusesList(actionCode, idResult, parentEntityId) : null;

            return(Json(new
            {
                success = true,
                actionStatuses = result
            }));
        }
Ejemplo n.º 2
0
        public JsonResult GetEntityTypeIdToActionListItemsDictionary()
        {
            var dictionary = BackendActionService.GetEntityTypeIdToActionListItemsDictionary();

            return(Json(new
            {
                success = true,
                dictionary
            }));
        }
Ejemplo n.º 3
0
        public JsonResult GetByAlias(string alias)
        {
            var action = BackendActionService.GetByAlias(alias);

            return(Json(new
            {
                success = true,
                action
            }));
        }
Ejemplo n.º 4
0
        public JsonResult GetCodeById(int actionId)
        {
            var actionCode = BackendActionService.GetCodeById(actionId);

            return(Json(new
            {
                success = true,
                actionCode
            }));
        }
Ejemplo n.º 5
0
        public JsonResult GetByCode(string actionCode)
        {
            var action = BackendActionService.GetByCode(actionCode);

            return(Json(new
            {
                success = true,
                action
            }));
        }
Ejemplo n.º 6
0
        public JsonResult GetEntityTypeIdToActionListItemsDictionary()
        {
            var dictionary = BackendActionService.GetEntityTypeIdToActionListItemsDictionary();

            return(new JsonResult
            {
                Data = new
                {
                    success = true,
                    dictionary
                },
                JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
Ejemplo n.º 7
0
        public JsonResult GetCodeById(int actionId)
        {
            var actionCode = BackendActionService.GetCodeById(actionId);

            return(new JsonResult
            {
                Data = new
                {
                    success = true,
                    actionCode
                },
                JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
Ejemplo n.º 8
0
        public JsonResult GetByCode(string actionCode)
        {
            var action = BackendActionService.GetByCode(actionCode);

            return(new JsonResult
            {
                Data = new
                {
                    success = true,
                    action
                },
                JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
Ejemplo n.º 9
0
        protected MultistepActionServiceContext CreateContext(int parentId, int id, int[] ids, bool?boundToExternal)
        {
            var action       = BackendActionService.GetByCode(ActionCode);
            var itemsPerStep = action.EntityLimit ?? 1;
            var state        = new MultistepActionStageCommandState
            {
                ParentId            = parentId,
                Id                  = id,
                Ids                 = ids.ToList(),
                ExtensionContentIds = ContentRepository.GetReferencedAggregatedContentIds(parentId, ids).ToList(),
                BoundToExternal     = boundToExternal,
                ItemsPerStep        = itemsPerStep
            };

            Command = (TCommand)CreateCommand(state);
            var result = new MultistepActionServiceContext();

            result.CommandStates.Add(Command.GetState());
            return(result);
        }
Ejemplo n.º 10
0
 public XmlDbUpdateRecordedAction()
 {
     _backendAction = new InitPropertyValue <BackendAction>(() => BackendActionService.GetByCode(Code));
 }