Exemplo n.º 1
0
        /// <summary>
        /// 删除日志
        /// </summary>
        /// <param name="userInfo">用户</param>
        /// <param name="id">主键</param>
        /// <returns>影响行数</returns>
        public int Delete(UserInfo userInfo, string id)
        {
            int returnValue = 0;
            var parameter   = ParameterUtil.CreateWithMessage(userInfo, MethodBase.GetCurrentMethod(), this.serviceName, RDIFrameworkMessage.LogService_Delete, "主键:" + id);

            ServiceUtil.ProcessRDIWriteDb(userInfo, parameter, dbProvider =>
            {
                returnValue = new LogManager(dbProvider, userInfo).Delete(CiLogTable.FieldId, id);
            });
            return(returnValue);
        }
        /// <summary>
        /// 更新查询引擎定义
        /// </summary>
        /// <param name="userInfo">用户</param>
        /// <param name="entity">查询引擎定义实体</param>
        /// <param name="statusCode">返回状态码</param>
        /// <param name="statusMessage">返回状态信息</param>
        /// <returns>影响行数</returns>
        public int UpdateQueryEngineDefine(UserInfo userInfo, QueryEngineDefineEntity entity, out string statusCode, out string statusMessage)
        {
            int    returnValue   = 0;
            string returnCode    = string.Empty;
            string returnMessage = string.Empty;
            var    parameter     = ParameterUtil.CreateWithMessage(userInfo, MethodBase.GetCurrentMethod(), this.serviceName, RDIFrameworkMessage.QueryEnginService_Update);

            ServiceUtil.ProcessRDIWriteDb(userInfo, parameter, dbProvider =>
            {
                var manager   = new QueryEngineDefineManager(dbProvider, userInfo);
                returnValue   = manager.UpdateEntity(entity, out returnCode);
                returnMessage = manager.GetStateMessage(returnCode);
            });
            statusCode    = returnCode;
            statusMessage = returnMessage;
            return(returnValue);
        }