/// <summary>
        /// 更新任务授权
        /// </summary>
        /// <param name="userInfo">用户</param>
        /// <param name="entity">实体</param>
        /// <returns>大于0成功</returns>
        public int UpdateAccreditUser(UserInfo userInfo, AccreditUserEntity entity)
        {
            var returnValue = -1;
            var parameter   = ParameterUtil.CreateWithOutMessage(userInfo, MethodBase.GetCurrentMethod(), this.serviceName);

            ServiceUtil.ProcessWorkFlowDbWithTransaction(userInfo, parameter, dbProvider =>
            {
                var manager = new AccreditUserManager(dbProvider, userInfo);
                returnValue = manager.UpdateAccreditUser(entity);
            });
            return(returnValue);
        }
        /// <summary>
        /// 依据主键获得任务授权列表
        /// </summary>
        /// <param name="userInfo">用户</param>
        /// <param name="auserId">主键</param>
        /// <returns>任务授权列表</returns>
        public DataTable GetAccreditUserTable(UserInfo userInfo, string auserId)
        {
            var parameter = ParameterUtil.CreateWithOutMessage(userInfo, MethodBase.GetCurrentMethod(), this.serviceName);
            var dataTable = new DataTable(AccreditUserTable.TableName);

            ServiceUtil.ProcessWorkFlowDb(userInfo, parameter, dbProvider =>
            {
                var manager = new AccreditUserManager(dbProvider, userInfo);
                dataTable   = manager.GetAccreditUserTable(auserId);
            });
            return(dataTable);
        }
        /// <summary>
        /// 判断用户是否是该任务节点的操作者
        /// </summary>
        /// <param name="userInfo">用户</param>
        /// <param name="userId">用户Id</param>
        /// <param name="workFlowId">流程模版Id</param>
        /// <param name="workTaskId">工作任务Id</param>
        /// <returns></returns>
        public bool IsTaskOperator(UserInfo userInfo, string userId, string workFlowId, string workTaskId)
        {
            bool returnValue = false;
            var  parameter   = ParameterUtil.CreateWithOutMessage(userInfo, MethodBase.GetCurrentMethod(), this.serviceName);

            ServiceUtil.ProcessWorkFlowDb(userInfo, parameter, dbProvider =>
            {
                var manager = new AccreditUserManager(dbProvider, userInfo);
                returnValue = manager.IsTaskOperator(userId, workFlowId, workTaskId);
            });
            return(returnValue);
        }