Ejemplo n.º 1
0
        //************************************************************************
        /// <summary>
        /// データベースの接続に必要な情報を取得します
        /// </summary>
        /// <returns>データベースのConnectStringを返す</returns>
        //************************************************************************
        protected static string GetConnectionString()
        {
            NdnXmlConfig xmlConfig;

            xmlConfig = new NdnXmlConfig(NCConst.CONFIG_FILE_DIR + NCUtility.GetAppConfig());
            string strConnectionString = null;

            if (xmlConfig.ReadXmlData("database", ConnectionStr, ref strConnectionString))
            {
                string[] temp = strConnectionString.Split(';');
                if (temp.Length > 0)
                {
                    for (int idx = 0; idx < temp.Length; idx++)
                    {
                        if (temp[idx].IndexOf("Password="******"Password="******"");
                            temp[idx] = "Password="******";", temp);
                return(strConnectionString);
            }
            else
            {
                return(null);
            }
        }
Ejemplo n.º 2
0
        private string[] m_strMessageArray; //メッセージ配列

//		private string m_strDetailMessage;//表示されたい詳細メッセージ

        //************************************************************************
        /// <summary>
        /// エラーコードだけを投げます
        /// </summary>
        /// <param name="strErrorCode">エラーメッセージ</param>
        /// <returns>void</returns>
        //************************************************************************
        public NdnException(
            string strErrorCode
            )
        {
            m_strCode = strErrorCode;
            NdnXmlConfig ndnXmlConfig = new NdnXmlConfig(m_xmlFileName);

            ndnXmlConfig.ReadXmlData(m_xmlLocalName, m_strCode, ref m_strMessage);
        }
Ejemplo n.º 3
0
 //************************************************************************
 /// <summary>
 /// Ekk.iniファイルパスを取得します
 /// </summary>
 /// <param name="strIniPath">string Ekk.iniファイルパス</param>
 //************************************************************************
 private void GetIniPath(ref string strIniPath)
 {
     try
     {
         NdnXmlConfig xmlConfig = null;
         xmlConfig = new NdnXmlConfig(NCUtility.GetAppConfig(), NCConst.CONFIG_FILE_DIR);
         xmlConfig.ReadXmlData("log", "IniPath", ref strIniPath);
         if (strIniPath == "")
         {
             strIniPath = Directory.GetCurrentDirectory();
         }
     }
     catch
     {
         strIniPath = Directory.GetCurrentDirectory();
     }
 }
Ejemplo n.º 4
0
 //************************************************************************
 /// <summary>
 /// ログのパラメーターを取得します
 /// </summary>
 /// <remarks>
 /// ログのパラメーターを取得します
 /// </remarks>
 /// <param name="strLogPath">string ログファイルパス</param>
 /// <param name="strLogFile">string ログファイル名</param>
 /// <param name="strFileExt">string ログファイル拡張子</param>
 /// <param name="iLogCount">int ログファイル数</param>
 /// <param name="iLogSize">int ログファイルサイズ</param>
 /// <returns>なし</returns>
 /// <example>
 /// <code></code>
 /// </example>
 //************************************************************************
 private void GetLogConfig(ref string strLogPath, ref string strLogFile, ref string strFileExt, ref int iLogCount, ref int iLogSize, ref int iLogLevel)
 {
     try
     {
         string       strValue  = "";
         NdnXmlConfig xmlConfig = null;
         xmlConfig = new NdnXmlConfig(NCUtility.GetAppConfig(), NCConst.CONFIG_FILE_DIR);
         xmlConfig.ReadXmlData("log", "LogPath", ref strLogPath);
         xmlConfig.ReadXmlData("log", "LogFile", ref strLogFile);
         xmlConfig.ReadXmlData("log", "LogExt", ref strFileExt);
         xmlConfig.ReadXmlData("log", "LogCount", ref strValue);
         iLogCount = m_pFunc.StringToInt(strValue, 8);
         xmlConfig.ReadXmlData("log", "LogSize", ref strValue);
         iLogSize = m_pFunc.StringToInt(strValue, 4096000);
         xmlConfig.ReadXmlData("log", "LogLevel", ref strValue);
         iLogLevel = m_pFunc.StringToInt(strValue, 3);
     }
     catch
     {
     }
 }