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(); }
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); } }
public void LoadSchemaSettings() { try { if (_schema_settings != null) { return; } _schema_settings = Library.SchemaSettings.GetList(); _schema_settings.CloseSession(); } catch (Exception ex) { iQExceptionHandler.TreatException(ex); } }