Exemplo n.º 1
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);
        }