Esempio n. 1
0
        public virtual void SaveSettings()
        {
            if (_app_settings != null)
            {
                _app_settings.OpenNewSession();
                _app_settings.BeginTransaction();
                _app_settings.Save();
                _app_settings.CloseSession();
            }

            if (_schema_settings != null)
            {
                _schema_settings.OpenNewSession();
                _schema_settings.BeginTransaction();
                _schema_settings.Save();
                _schema_settings.CloseSession();
            }

            if (_user_settings != null)
            {
                UserSettings.OpenNewSession();
                UserSettings.BeginTransaction();
                UserSettings.Save();
                UserSettings.CloseSession();
            }

            Properties.Settings.Default.Save();

            EMailClient.Instance.LoadSMTPConfig();
        }
Esempio n. 2
0
        public void LoadSettings(User user)
        {
            try
            {
                CloseSettings(user);

                _app_settings = ApplicationSettings.GetList();
                _app_settings.CloseSession();

                _schema_settings = Library.SchemaSettings.GetList();
                _schema_settings.CloseSession();

                if (!_user_settings.ContainsKey(user.Name))
                {
                    _user_settings.Add(user.Name, UserSettings.GetListByUser(user));
                    UserSettings.CloseSession();
                }

                LoadDefaultSettings();
            }
            catch (Exception ex)
            {
                iQExceptionHandler.TreatException(ex);
            }
        }
Esempio n. 3
0
        public void LoadSchemaSettings()
        {
            try
            {
                if (_schema_settings != null)
                {
                    return;
                }

                _schema_settings = Library.SchemaSettings.GetList();
                _schema_settings.CloseSession();
            }
            catch (Exception ex)
            {
                iQExceptionHandler.TreatException(ex);
            }
        }