コード例 #1
0
        public ActionResult CreateWorkflowDefinitionVersion(long workflowDefinitionId)
        {
            var workflowDefinitionVersion = new WorkflowDefinitionVersion
            {
                IsNew = true
            };

            _workflowDefinitionVersionRepository.Insert(workflowDefinitionVersion);

            var workflowDefinition = _workflowDefinitionRepository.GetById(workflowDefinitionId);

            workflowDefinition.WorkflowDefinitionVersions.Add(workflowDefinitionVersion);

            this._dbContext.SaveChanges();

            var model = new WorkflowDefinitionVersionModel();

            model = workflowDefinitionVersion.ToModel();
            var html = this.WorkflowDefinitionVersionPanel(model);

            return(Json(new { Id = workflowDefinitionVersion.Id, Html = html }));
        }
コード例 #2
0
        public string WorkflowDefinitionVersionPanel(WorkflowDefinitionVersionModel model)
        {
            var html = this.RenderPartialViewToString("_WorkflowDefinitionVersionDetails", model);

            return(html);
        }