Exemple #1
0
        /// <summary>
        /// Sets the settings.
        /// </summary>
        /// <param name="siteSettings">The site settings.</param>
        public static void SetSettings(IRoadsService client, SiteSettingsModel siteSettings)
        {
            List<SettingData> settings = client.GetSettings().ToList();

            foreach (SettingData setting in settings)
            {
                if (String.Compare(setting.SettingName, numberOfRecordPerPage, false) == 0)
                {
                    setting.SettingValue = siteSettings.numberOfRecordsPerPage.ToString();
                }
                else if (String.Compare(setting.SettingName, searchDepth, false) == 0)
                {
                    setting.SettingValue = siteSettings.searchDepth.ToString();
                }
            }
            client.SetSettings(settings.ToArray());
        }