コード例 #1
0
        public static void UpdateSettings(int ModuleID, List <IUIData> Settings)
        {
            if (Settings != null && Settings.Count > 0)
            {
                SettingFactory.Update(Settings.Cast <Setting>().ToList());
                if (Settings.Where(a => a.Name == "Password").FirstOrDefault() != null)
                {
                    SettingFactory.UpdateValue(ModuleID, AppFactory.Identifiers.admin_notifications_email.ToString(), "Password", FIPSCompliant.EncryptAES(Settings.Where(a => a.Name == "Password").Select(a => new { a.Value }).FirstOrDefault().Value, Config.GetDecryptionkey(), Host.GUID, 1000));
                }

                CacheFactory.ClearCache();
            }
        }
コード例 #2
0
        public static List <IUIData> GetSettings(int ModuleID)
        {
            CacheFactory.ClearCache();
            Dictionary <string, IUIData> Settings = SettingFactory.GetDictionary(ModuleID, AppFactory.Identifiers.admin_notifications_email.ToString());
            List <dynamic> ServerTypes            = new List <dynamic>
            {
                new { AuthenticationType = "Anonymous" },
                new { AuthenticationType = "NTLM" },
                new { AuthenticationType = "Basic" }
            };

            Settings["Authentication"].Options      = ServerTypes;
            Settings["Authentication"].OptionsText  = "AuthenticationType";
            Settings["Authentication"].OptionsValue = "AuthenticationType";
            Settings["Password"].Value = FIPSCompliant.DecryptAES(Settings["Password"].Value, Config.GetDecryptionkey(), Host.GUID, 1000);
            return(Settings.Values.ToList());
        }