Ejemplo n.º 1
0
        /// <summary>
        /// Purpose: Grabs configuration information based on configuration code
        /// Accepts: String
        /// Returns: Nothing
        /// </summary>
        public void GetConfigurationByCode(string code)
        {
            try
            {
                ConfigurationData data = new ConfigurationData();
                Hashtable hsh = new Hashtable();

                hsh = data.GetConfigurationByCode(code);

                ConfigurationCode= code;
                Description = hsh["description"];
                Value = hsh["value"];
                IsYesNoValue = hsh["isyesnovalue"];
                YesNoValue = hsh["yesnovalue"];
                Modified = hsh["modified"];
            }
            catch (Exception ex)
            {
                ErrorRoutine(ex, "Configuration", "GetConfigurationByCode");
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Purpose: Grabs all configuration settings
        /// Accepts: Nothing
        /// Returns: List<Configuration>
        /// </summary>
        public List<Configuration> GetAllConfigurations()
        {
            List<Configuration> configs = new List<Configuration>();
            try
            {
                ConfigurationData data = new ConfigurationData();
                List<QSRDataObjects.Configuration> dataConfigs = data.GetAllConfigurations();

                foreach (QSRDataObjects.Configuration c in dataConfigs)
                {
                    Configuration config = new Configuration();
                    config.ConfigurationCode = c.ConfigurationCode;
                    config.Description = c.Description;
                    config.Value = c.Value;
                    config.IsYesNoValue = c.IsYesNoValue;
                    config.YesNoValue = c.YesNoValue;
                    config.Modified = c.Modified;
                    configs.Add(config);
                }
            }
            catch (Exception ex)
            {
                ErrorRoutine(ex, "Configuration", "GetAllConfigurations");
            }
            return configs;
        }