예제 #1
0
        public bool SaveSMSSettings(SMSSettingsModel model)
        {
            var settings = CustomDatabase.GetSettingsFromDatabase();

            settings.SMS_CurrentSMSProvider = model.CurrentSMSProvider;
            settings.SMS_Enabled            = model.Enabled;
            settings.SMS_MessageFormat      = model.MessageFormat;

            CustomDatabase.SaveSettings(settings);

            SettingsCache.ClearCache();
            return(true);
        }
예제 #2
0
        public SMSSettingsModel GetSMSSettings()
        {
            var settings  = SettingsCache.Instance;
            var viewModel = new SMSSettingsModel()
            {
                MessageFormat      = settings.SMS_MessageFormat,
                Enabled            = settings.SMS_Enabled,
                CurrentSMSProvider = settings.SMS_CurrentSMSProvider
            };

            viewModel.SMSProviders = FortressContext.GetAllSmsProviders();



            return(viewModel);
        }