Example #1
0
        public int FreeAuditReject(BaseWorkFlowAuditInfo workFlowAuditInfo)
        {
            IWorkFlowManager workFlowManager = this.GetWorkFlowManager(workFlowAuditInfo.Id);

            workFlowManager.SetUserInfo(this.UserInfo);
            return(FreeAuditReject(workFlowManager, workFlowAuditInfo));
        }
Example #2
0
        /// <summary>
        /// 获取反射调用的类
        /// 回写状态时用
        /// </summary>
        /// <param name="currentId">当前工作流主键</param>
        /// <returns></returns>
        public IWorkFlowManager GetWorkFlowManager(string currentId)
        {
            IWorkFlowManager          workFlowManager       = null;
            BaseWorkFlowCurrentEntity workFlowCurrentEntity = this.GetObject(currentId);
            string processId = this.GetObject(currentId).ProcessId.ToString();

            if (!string.IsNullOrEmpty(processId))
            {
                BaseWorkFlowProcessManager workFlowProcessManager = new BaseWorkFlowProcessManager(this.DbHelper, this.UserInfo);
                BaseWorkFlowProcessEntity  workFlowProcessEntity  = new BaseWorkFlowProcessEntity();
                if (!string.IsNullOrEmpty(processId))
                {
                    workFlowProcessEntity = workFlowProcessManager.GetObject(processId);
                }
                // 这里本来是想动态创建类库 编码外包[100]
                // System.Reflection.Assembly assembly = Assembly.Load("__code");
                // System.Reflection.Assembly assembly = Assembly.Load("app_code");
                string assemblyString = workFlowProcessEntity.CallBackAssembly;
                workFlowManager = (IWorkFlowManager)Assembly.Load(assemblyString).CreateInstance(workFlowProcessEntity.CallBackClass, true);
                // Type objType = assembly.GetType(workFlowProcessEntity.CallBackClass, true);
                // workFlowManager = (IWorkFlowManager)Activator.CreateInstance(objType);
                workFlowManager.SetUserInfo(this.UserInfo);
                workFlowManager.CurrentTableName = workFlowCurrentEntity.CategoryCode;
                if (!string.IsNullOrEmpty(workFlowProcessEntity.CallBackTable))
                {
                    // 这里本来是想动态创建类库 编码外包[100]
                    workFlowManager.CurrentTableName = workFlowProcessEntity.CallBackTable;
                }
            }
            // workFlowManager = new BaseUserBillManager(this.DbHelper, this.UserInfo);
            return(workFlowManager);
        }
Example #3
0
        public int AuditQuash(string currentId, string auditIdea)
        {
            IWorkFlowManager workFlowManager = this.GetWorkFlowManager(currentId);

            workFlowManager.SetUserInfo(this.UserInfo);
            return(AuditQuash(workFlowManager, currentId, auditIdea));
        }
Example #4
0
        public string FreeAuditStatr(BaseWorkFlowAuditInfo workFlowAuditInfo)
        {
            IWorkFlowManager workFlowManager = this.GetWorkFlowManager(workFlowAuditInfo);

            workFlowManager.SetUserInfo(this.UserInfo);
            return(FreeAuditStatr(workFlowManager, workFlowAuditInfo));
        }
        public int FreeAuditPass(string currentId, string toUserId, string toDepartmentId = null, string toRoleId = null, string auditIdea = null)
        {
            IWorkFlowManager workFlowManager = this.GetWorkFlowManager(currentId);

            workFlowManager.SetUserInfo(this.UserInfo);
            return(FreeAuditPass(workFlowManager, currentId, toUserId, toDepartmentId, toRoleId, auditIdea));
        }
        /// <summary>
        /// 退回到第几步审核
        /// </summary>
        /// <param name="currentId">当前工作流主键</param>
        /// <param name="auditIdea">审核意见</param>
        /// <param name="historyId">退回到第几步,这里不应该是activityId</param>
        /// <returns>影响行数</returns>
        public int AuditReject(string currentId, string auditIdea, string historyId = null)
        {
            IWorkFlowManager workFlowManager = this.GetWorkFlowManager(currentId);

            workFlowManager.SetUserInfo(this.UserInfo);
            return(AuditReject(workFlowManager, currentId, auditIdea, historyId));
        }
Example #7
0
        public string FreeAuditComplete(BaseWorkFlowAuditInfo workFlowAuditInfo)
        {
            workFlowAuditInfo.Id = this.GetCurrentId(workFlowAuditInfo.CategoryCode, workFlowAuditInfo.ObjectId);
            IWorkFlowManager workFlowManager = this.GetWorkFlowManager(workFlowAuditInfo.Id);

            workFlowManager.SetUserInfo(this.UserInfo);
            return(FreeAuditComplete(workFlowManager, workFlowAuditInfo));
        }
Example #8
0
        public IWorkFlowManager GetWorkFlowManager(BaseWorkFlowAuditInfo workFlowAuditInfo)
        {
            IWorkFlowManager workFlowManager = null;
            // Type objType = Type.GetType(workFlowAuditInfo.CallBackClass, true);
            // workFlowManager = (IWorkFlowManager)Activator.CreateInstance(objType);
            string assemblyString = workFlowAuditInfo.CallBackClass.Substring(0, workFlowAuditInfo.CallBackClass.LastIndexOf('.'));

            workFlowManager = (IWorkFlowManager)Assembly.Load(assemblyString).CreateInstance(workFlowAuditInfo.CallBackClass);
            workFlowManager.SetUserInfo(this.UserInfo);
            if (!string.IsNullOrEmpty(workFlowAuditInfo.CallBackTable))
            {
                // 这里本来是想动态创建类库 编码外包[100]
                workFlowManager.CurrentTableName = workFlowAuditInfo.CallBackTable;
            }
            return(workFlowManager);
        }
        public IWorkFlowManager GetWorkFlowManager(string id)
        {
            IWorkFlowManager          workFlowManager       = null;
            BaseWorkFlowProcessEntity workFlowProcessEntity = this.GetEntity(id);

            if (!string.IsNullOrEmpty(workFlowProcessEntity.CallBackClass))
            {
                // 这里本来是想动态创建类库 编码外包[100]
                Type objType = Type.GetType(workFlowProcessEntity.CallBackClass, true);
                workFlowManager = (IWorkFlowManager)Activator.CreateInstance(objType);
                workFlowManager.SetUserInfo(this.UserInfo);
                if (!string.IsNullOrEmpty(workFlowProcessEntity.CallBackTable))
                {
                    workFlowManager.CurrentTableName = workFlowProcessEntity.CallBackTable;
                }
            }
            // workFlowManager = new BaseUserBillManager(this.DbHelper, this.UserInfo);
            return(workFlowManager);
        }