예제 #1
0
        /// <summary>
        /// 编辑流程模板配置
        /// </summary>
        /// <param name="Action"></param>
        /// <param name="ObjectID"></param>
        /// <param name="ProcessParentId"></param>
        /// <param name="ProcessName"></param>
        /// <param name="ProcessCode"></param>
        /// <returns></returns>
        public ActionResult EditWorkflowTemplate(int Action, string ObjectID, string ProcessParentId, string ProcessName, string ProcessCode)
        {
            AjaxReturnData result    = new AjaxReturnData();
            int            EditCount = 0;

            if (Convert.ToInt32(EditType.增加) == Action)
            {
                //新增
                OT_WorkflowTemplate model = new OT_WorkflowTemplate();
                model.ObjectID       = ObjectID;
                model.ParentObjectID = ProcessParentId;
                model.WorkflowCode   = ProcessCode;
                model.ProcessName    = ProcessName;
                model.Content        = WorkflowHelper.CreateDefaultContent(ProcessCode);
                EditCount            = _workflowTemplateService.Insert <OT_WorkflowTemplate>(model);
            }
            else if (Convert.ToInt32(EditType.修改) == Action)
            {
            }
            if (EditCount > 0)
            {
                result.States  = true;
                result.Message = "成功.";
            }
            else
            {
                result.States  = false;
                result.Message = "失败.";
            }

            return(AjaxJson(result));
        }