public void SetConfig(Webb.Reports.DataProvider.DBSourceConfig config) { _DbSourceConfig.ApplyConfig(config); string strDatabasePath = _DbSourceConfig.DBFilePath; if (strDatabasePath == null || strDatabasePath == string.Empty) { VictoryPathManager victoryPathManager = new VictoryPathManager(config.WebbDBType); strDatabasePath = victoryPathManager.GetVictoryDatabasePath(); } this.C_SelectedFile.Text = strDatabasePath; this.SetGamesAndEdlsView(); }
public bool UpdateConfig(ref Webb.Reports.DataProvider.DBSourceConfig config) { if (!this.ValidateSetting()) { return(false); } _DbSourceConfig.DBFilePath = this.C_SelectedFile.Text; _DbSourceConfig.DBConnType = Webb.Data.DBConnTypes.OleDB; _DbSourceConfig.GameIDs = this.GetSelectedGameIDs(); _DbSourceConfig.Edls = this.GetSelectedEdlIDs(); config.ApplyConfig(this._DbSourceConfig); return(true); }
public void ApplyConfig(DBSourceConfig oldDBSourceConfig) { this._DefaultSQLCmd = oldDBSourceConfig._DefaultSQLCmd; this._ConnString = oldDBSourceConfig._ConnString; this._DBSourceName = oldDBSourceConfig._DBSourceName; this._DBCatalogName = oldDBSourceConfig._DBCatalogName; this._FilePath = oldDBSourceConfig._FilePath; this._DBConnType = oldDBSourceConfig._DBConnType; this._WebbDBType = oldDBSourceConfig._WebbDBType; this.DBConnType = oldDBSourceConfig.DBConnType; this.WebbDBType = oldDBSourceConfig.WebbDBType; oldDBSourceConfig.GameIDs.CopyTo(this._GameIDs); oldDBSourceConfig.FilterIDs.CopyTo(this._FilterIDs); oldDBSourceConfig.SectionFilterIDs.CopyTo(this._SectionFilterIDs); this._Games = oldDBSourceConfig.Games; this._Edls = oldDBSourceConfig.Edls; this._UserFolder = oldDBSourceConfig.UserFolder; this._HeaderName = oldDBSourceConfig.HeaderName; this._WartermarkImagePath = oldDBSourceConfig.WartermarkImagePath; this._Templates = oldDBSourceConfig._Templates; this._PrinterName = oldDBSourceConfig._PrinterName; this._Filters = oldDBSourceConfig.Filters; }