Esempio n. 1
0
        /// <summary>
        /// loads the configuration from the config file
        /// </summary>
        public static void Load()
        {
            string strValue = ""; //value

            //initialize

            strValue = ConfigurationManager.AppSettings[C_KEY_CONNECTSTRING];
            if (strValue != null)
            {
                m_strConnectString = strValue;
            }
            string strIsDebug = "";

            strIsDebug = ConfigurationManager.AppSettings[C_KEY_DEBUG];
            if (strIsDebug == C_TRUE)
            {
                m_bIsDebug = true;
            }
            else
            {
                m_bIsDebug = false;
            }


            //logÊä³ö·¾¶
            m_sLogPath   = ConfigurationManager.AppSettings["LogPath"];
            m_sImagePath = ConfigurationManager.AppSettings["ImagePath"];
            m_sSiteRoot  = ConfigurationManager.AppSettings["SiteRoot"];

            strValue = ConfigurationManager.AppSettings["DBTimeout"];
            if (strValue != null)
            {
                m_nDBTimeout = CConvert.ToInt16(strValue);
            }
        }