コード例 #1
0
ファイル: SysDataWrite.cs プロジェクト: wooln/AK47Source
        /// <summary>
        /// 写入系统日志
        /// </summary>
        /// <param name="killInfo">杀毒软件</param>
        /// <param name="status">是否登陆成功</param>
        /// <param name="description">系统说明</param>
        public static void InsertSysLog(string killInfo, string status, string description)
        {
            string strSql = GetInsertSysSql(killInfo, status, description);

            using (TransactionScope scope = TransactionScopeFactory.Create())
            {
                CommonDefine.ExecuteNonQuery(strSql);
                scope.Complete();
            }
        }
コード例 #2
0
ファイル: SysDataWrite.cs プロジェクト: wooln/AK47Source
        /// <summary>
        /// 写入系统日志
        /// </summary>
        /// <param name="userLogonName">用户登录名</param>
        /// <param name="winVer">windows版本</param>
        /// <param name="ieVer">ie版本</param>
        /// <param name="hostIP">客户端IP</param>
        /// <param name="hostName">客户端机器名</param>
        /// <param name="killInfo">杀毒软件</param>
        /// <param name="status">是否登陆成功</param>
        /// <param name="description">系统说明</param>
        public static void InsertSysLog(string userLogonName,
                                        string winVer,
                                        string ieVer,
                                        string hostIP,
                                        string hostName,
                                        string killInfo,
                                        string status,
                                        string description)
        {
            string strSql = GetInsertSysSql2(userLogonName, winVer, ieVer, hostIP, hostName, killInfo, status, description);

            using (TransactionScope scope = TransactionScopeFactory.Create())
            {
                CommonDefine.ExecuteNonQuery(strSql);
                scope.Complete();
            }
        }
コード例 #3
0
        /// <summary>
        /// 向日志表中插入数据
        /// </summary>
        /// <param name="strAppName">应用程序英文标识</param>
        /// <param name="strGoalID">跟踪操作的英文标识</param>
        /// <param name="strGoalName">跟踪操作的中文标识</param>
        /// <param name="strGoalDisplayName">跟踪操作的中文解释</param>
        /// <param name="strOpType">操作类型英文标志</param>
        /// <param name="strExplain">操作的详细说明</param>
        /// <param name="strOriginalData">操作的原始数据</param>
        /// <param name="bOpSucceed">该操作是否成功</param>
        public static void InsertUserLog(string strAppName,
                                         string strGoalID,
                                         string strGoalName,
                                         string strGoalDisplayName,
                                         string strOpType,
                                         string strExplain,
                                         string strOriginalData,
                                         bool bOpSucceed)
        {
            string strSql = GetInsertUserSql(strAppName, strGoalID, strGoalName, strGoalDisplayName, strOpType, strExplain, strOriginalData, bOpSucceed);

            if (false == string.IsNullOrEmpty(strSql))
            {
                using (TransactionScope scope = TransactionScopeFactory.Create())
                {
                    CommonDefine.ExecuteNonQuery(strSql);
                    scope.Complete();
                }
            }
        }
コード例 #4
0
        /// <summary>
        /// 获取对应数据的标识
        /// </summary>
        /// <param name="strAppName">应用程序英文标识</param>
        /// <param name="strOpType">操作类型英文标识</param>
        /// <param name="strColName">设置的字段名称</param>
        /// <returns>对应数据的标识</returns>
        public static string GetGuidByType(string strAppName,
                                           string strOpType,
                                           string strColName)
        {
            string strSql = @"
					SELECT GUID 
					FROM APP_LOG_TYPE 
					WHERE "                     + TSqlBuilder.Instance.CheckQuotationMark(strColName, false)
                            + " = " + TSqlBuilder.Instance.CheckQuotationMark(strAppName, true);

            if (strOpType != "")
            {
                strSql = @"
					SELECT APP_OPERATION_TYPE.GUID 
					FROM APP_OPERATION_TYPE, APP_LOG_TYPE 
					WHERE APP_OPERATION_TYPE.CODE_NAME = "                     + TSqlBuilder.Instance.CheckQuotationMark(strOpType, true) + @" 
						AND APP_LOG_TYPE."                         + TSqlBuilder.Instance.CheckQuotationMark(strColName, false)
                         + " = " + TSqlBuilder.Instance.CheckQuotationMark(strAppName, true) + @" 
						AND APP_OPERATION_TYPE.APP_GUID = APP_LOG_TYPE.GUID"                        ;
            }

            return(CommonDefine.ExecuteScalar(strSql).ToString());
        }