/// <summary> /// Retrieve all settings from DB /// </summary> /// <returns>Setting Key/Value</returns> public static NameValueCollection GetSettings() { int environmentId = APConvert.ToInt(ConfigurationManager.AppSettings[GlobalConstants.EnvironmentIDAppSettingName]); //Get Environment settings for specific Environment Id return(GetSettings(environmentId)); }
/// <summary> /// Get settings for Areas using Stored Procedure /// </summary> /// <param name="environmentId">Identity of Environment</param> /// <returns>Environment Setting Information</returns> private static EnvironmentSettingInformation GetSettingsForUI(int environmentId) { EnvironmentSettingInformation settingInfo = new EnvironmentSettingInformation(); Collection <ApplicationSetting> settings = new Collection <ApplicationSetting>(); //Get SQL Reader for a specific environment using (IDataReader reader = GetReadSettingsReader(environmentId)) { while (reader.Read()) //Read data set of settings information { ApplicationSetting setting = new ApplicationSetting(); setting.Id = APConvert.ToInt(reader[DataConstants.SpGetEnvironmentSettingsAppSettingID]); setting.Key = (APConvert.ToString(reader[DataConstants.SpGetEnvironmentSettingsKey])).Trim(); setting.Value = (APConvert.ToString(reader[DataConstants.SpGetEnvironmentSettingsValue])).Trim(); setting.Area = (APConvert.ToString(reader[DataConstants.SpGetEnvironmentSettingsAreaName])).Trim(); //Area name of the setting setting.IsEnvironmentRelated = APConvert.ToBoolean(reader[DataConstants.SpGetEnvironmentSettingsIsEnvironmentRelated]); //Whether setting is Environment related or not setting.IsReadOnly = APConvert.ToBoolean(reader[DataConstants.SpGetEnvironmentSettingsIsReadOnly]); //Whether setting is Read only or editable settings.Add(setting); } reader.NextResult(); if (reader.Read()) //Get the environment name for the environment id from the databse SP { settingInfo.EnvironmentName = reader[DataConstants.SpGetEnvironmentSettingsEnvironmentName].ToString(); } else { settingInfo.EnvironmentName = string.Empty; } } settingInfo.Settings = settings; return(settingInfo); }
public string GetControllerName(string controllerID) { LandingPageMessageString messageString = (LandingPageMessageString)landingPageCache.GetData(controllerID); if (messageString == null) { return(getMessageString(controllerID, resourceStringProvider.LandingPageXmlFile, resourceStringProvider.LandingPageXmlNode, landingPageCache).ToString()); } return(APConvert.ToString(messageString.StringPageController)); }
public string GetLandingPage(string value) { LandingPageMessageString messageString = (LandingPageMessageString)landingPageCache.GetData(value); if (messageString == null) { return(getMessageString(value, resourceStringProvider.LandingPageXmlFile, resourceStringProvider.LandingPageXmlNode, landingPageCache).ToString()); } return(APConvert.ToString(messageString.StringPageAddress)); }
/// <summary> /// Retrieve Settings for Specific Environment ID /// </summary> /// <param name="environmentId">Identity of Environment</param> /// <returns>Setting Key/Value</returns> public static NameValueCollection GetSettings(int environmentId) { NameValueCollection settings = new NameValueCollection(); //Get SQL Reader for a specific environment using (IDataReader reader = GetReadSettingsReader(environmentId)) { while (reader.Read()) { string key = (APConvert.ToString(reader[DataConstants.SpGetEnvironmentSettingsKey])).Trim(); string value = (APConvert.ToString(reader[DataConstants.SpGetEnvironmentSettingsValue])).Trim(); settings.Add(key, value); } } return(settings); }
/// <summary> /// Get GetParameterLists based on the param /// </summary> /// <param name="parameterListValue"></param> /// <returns></returns> public Dictionary <string, string> GetParameterListInstance(string parameterListValue) { return(cache.GetParameterList(APConvert.ToString(parameterListValue))); }
/// <summary> /// Get GetController Name message based on the param /// </summary> /// <param name="controllerValue"></param> /// <returns></returns> public string GetControllerNameInstance(string controllerValue) { return(cache.GetControllerName(APConvert.ToString(controllerValue))); }
/// <summary> /// Get GetLanding Page message based on the param /// </summary> /// <param name="landingPageNo"></param> /// <returns></returns> public string GetLandingPageInstance(string landingPageNo) { return(cache.GetLandingPage(APConvert.ToString(landingPageNo))); }
/// <summary> /// Get Exception Policy message based on the param /// </summary> /// <param name="PolicyNo"></param> /// <returns></returns> public string GetExceptionPolicyInstance(ExceptionPolicyId PolicyNo) { return(cache.GetErrorMessage(APConvert.ToString(PolicyNo.GetHashCode()))); }
/// <summary> /// Get Error message based on the param /// </summary> /// <param name="resValue"></param> /// <returns></returns> public string GetErrorMessageInstance(ErrorMessageResID resValue) { return(cache.GetErrorMessage(APConvert.ToString(resValue.GetHashCode()))); }
/// <summary> /// Get Resource string based on the param /// </summary> /// <param name="resValue"></param> /// <returns></returns> public string GetResourceStringInstance(PageResourceID resValue) { return(cache.GetReplacementString(APConvert.ToString(resValue.GetHashCode()))); }
/// <summary> /// Get Resource string based on the param /// </summary> /// <param name="resourceStringInstanceValue"></param> /// <returns></returns> public string GetResourceStringInstance(ActionLinkResID resourceStringInstanceValue) { return(cache.GetReplacementString(APConvert.ToString(resourceStringInstanceValue.GetHashCode()))); }
/// <summary> /// Get Resource string based on the param /// </summary> /// <param name="resourceStringInstanceValue"></param> /// <returns></returns> public string GetResourceStringInstance(int resourceStringInstanceValue) { return(cache.GetReplacementString(APConvert.ToString(resourceStringInstanceValue))); }