private void InitFormValues() { bool showInstalledDatabaseProvidersOnly = this.ShowInstalledDatabaseProvidersOnly; PFConnectionManager connMgr = new PFConnectionManager(); PFKeyValueList <string, PFProviderDefinition> provDefs = connMgr.GetListOfProviderDefinitions(); if (provDefs.Count == 0) { connMgr.CreateProviderDefinitions(); } else { connMgr.UpdateAllProvidersInstallationStatus(); } provDefs = connMgr.GetListOfProviderDefinitions(); this.cboDatabaseTypeForOutputTable.Items.Clear(); foreach (stKeyValuePair <string, PFProviderDefinition> provDef in provDefs) { if (showInstalledDatabaseProvidersOnly) { if (provDef.Value.InstallationStatus == enProviderInstallationStatus.IsInstalled) { //this.cboDatabaseTypeForOutputTable.Items.Add(provDef.Key); if (provDef.Value.AvailableForSelection) { this.cboDatabaseTypeForOutputTable.Items.Add(provDef.Key); } else { ; } } else { ; } } else { this.cboDatabaseTypeForOutputTable.Items.Add(provDef.Key); } } SetOutputDatabaseProvider(); SetOutputConnectionString(); if (this.cboDatabaseTypeForOutputTable.Text.Trim().Length > 0) { SetOutputTableName(); SetOutputBatchSizeForDbPlatform(); } else { this.txtOutputTableName.Text = string.Empty; this.txtOutputBatchSize.Text = AppConfig.GetStringValueFromConfigFile("DefaultOutputDatabaseBatchSize", "120");; } this.chkReplaceExistingTable.Checked = AppConfig.GetBooleanValueFromConfigFile("ReplaceOutputTableIfExists", "False"); }
private void InitDatabaseTypesDropdown() { bool showInstalledDatabaseProvidersOnly = true; PFConnectionManager connMgr = new PFConnectionManager(); PFKeyValueList <string, PFProviderDefinition> provDefs = connMgr.GetListOfProviderDefinitions(); this.cboDatabaseTypeForOutputTables.Items.Clear(); foreach (stKeyValuePair <string, PFProviderDefinition> provDef in provDefs) { if (showInstalledDatabaseProvidersOnly) { if (provDef.Value.InstallationStatus == enProviderInstallationStatus.IsInstalled) { this.cboDatabaseTypeForOutputTables.Items.Add(provDef.Key); } else { ; } } else { this.cboDatabaseTypeForOutputTables.Items.Add(provDef.Key); } } }
private void InitDefaultDatabaseType(ComboBox cboDatabaseType, TextBox txtDefaultDatabseConnectionString) { bool showInstalledDatabaseProvidersOnly = pfDataViewerCP.Properties.Settings.Default.ShowInstalledDatabaseProvidersOnly; PFConnectionManager connMgr = new PFConnectionManager(); PFKeyValueList <string, PFProviderDefinition> provDefs = connMgr.GetListOfProviderDefinitions(); cboDatabaseType.Items.Clear(); foreach (stKeyValuePair <string, PFProviderDefinition> provDef in provDefs) { if (showInstalledDatabaseProvidersOnly) { if (provDef.Value.InstallationStatus == enProviderInstallationStatus.IsInstalled) { if (provDef.Value.AvailableForSelection) { cboDatabaseType.Items.Add(provDef.Key); } else { ; } } else { ; } } else { if (provDef.Value.AvailableForSelection) { cboDatabaseType.Items.Add(provDef.Key); } else { ; } } } if (DatabaseTypeIsInList(cboDatabaseType) == false) { //database type no longer in the list of database types available for use cboDatabaseType.Text = string.Empty; txtDefaultDatabseConnectionString.Text = string.Empty; } else { //database type is still in the list: do nothing ; } }
private void VerifyProviderLists() { PFKeyValueList <string, PFProviderDefinition> provDefs = _connMgr.GetListOfProviderDefinitions(); if (provDefs.Count == 0) { _connMgr.CreateProviderDefinitions(); } else { _connMgr.UpdateAllProvidersInstallationStatus(); } //provDefs = _connMgr.GetListOfProviderDefinitions(); }