Exemple #1
0
        private static string getConfigValue(int companyID, AspectEnums.ConfigKeys key)
        {
            string config = AppUtil.GetAppSettings(key);

            if (config.Contains(','))
            {
                return(config.Split(',').ToArray()[(companyID - 1)]);
            }
            else
            {
                return(config);
            }
        }
Exemple #2
0
        /// <summary>
        /// Method to get the Application Configuration Settings value using key name of settings
        /// </summary>
        /// <param name="key">config key name enum</param>
        /// <returns>returns application settings value</returns>
        public static string GetAppSettings(AspectEnums.ConfigKeys key)
        {
            string value;

            try
            {
                value = ConfigurationManager.AppSettings[key.ToString()];
            }
            catch (Exception)
            {
                value = string.Empty;
                //LogTraceEngine.WriteLog(ex.Message);
            }
            return(value);
        }
Exemple #3
0
        /// <summary>
        /// Method to get the Application Configuration Settings value using key name of settings
        /// </summary>
        /// <param name="key">config key name enum</param>
        /// <returns>returns application settings value</returns>
        public static string GetAppSettings(AspectEnums.ConfigKeys key)
        {
            string value = string.Empty;

            try
            {
                value = ConfigurationManager.AppSettings[key.ToString()];
            }
            catch (Exception ex)
            {
                value = string.Empty;
                ActivityLog.SetLog(ex.Message, LogLoc.ERROR);
            }
            return(value);
        }