/// <summary>获取日志存储库连接字符串 /// /// </summary> /// <returns></returns> public static string GetConn() { string conn = string.Empty; if (!string.IsNullOrEmpty(StaticInfoHelper.ConnString)) { conn = StaticInfoHelper.ConnString; } else { string strFilePath = Application.StartupPath + "\\log.ini"; if (File.Exists(strFilePath)) { conn = INIOperationHelper.INIGetStringValue(strFilePath, "LogConnection", "Connection", null); conn = DESEncryptHelper.Decrypt(conn, "test332211"); StaticInfoHelper.ConnString = conn; } } return(conn); }
/// <summary>获取日志存储类型 /// /// </summary> /// <returns></returns> public static string GetLogType() { //string val = ConfigurationManager.ConnectionStrings["LogConnection"].ProviderName; //return val; string val = string.Empty; if (!string.IsNullOrEmpty(StaticInfoHelper.LogType)) { val = StaticInfoHelper.LogType; } else { string strFilePath = Application.StartupPath + "\\log.ini"; if (File.Exists(strFilePath)) { val = INIOperationHelper.INIGetStringValue(strFilePath, "LogType", "Type", null); StaticInfoHelper.LogType = val; } } return(val); }