Exemple #1
0
        public bool SaveSMSProviderSettings(SMSProviderSettingsModel model)
        {
            var settings = CustomDatabase.GetSettingsFromDatabase();

            settings.SaveSmsProviderSettings(model);

            CustomDatabase.SaveSettings(settings);

            SettingsCache.ClearCache();
            return(true);
        }
Exemple #2
0
        public SMSProviderSettingsModel GetSMSProviderSettings(string ProviderName)
        {
            var type         = Type.GetType(ProviderName);
            var smsAttr      = type.GetCustomAttribute <SmsProviderAttribute>();
            var allProviders = FortressContext.GetAllSmsProviders();
            var thisProvider = allProviders.FirstOrDefault(x => x.Classname == ProviderName);
            var settings     = SettingsCache.Instance;
            var viewModel    = new SMSProviderSettingsModel()
            {
                Name      = smsAttr.Name,
                ClassName = thisProvider.Classname
            };

            viewModel.Settings = settings.GetPropertiesOnType(type);

            return(viewModel);
        }