void SetProvider() { lblConnectionType.Text = Provider.ProviderType.ToString(); txtAddres.Text = Provider.SourceInfo; txtApplicationId.Text = Provider.ApplicationId; cnnstring.Clear(); if (Provider.ProviderType == ServiceProviderType.xml) { cnnstring.Visible = false; lblAddress.Text = "File :"; btnView.Visible = true; } if (Provider.ProviderType == ServiceProviderType.sqldatabase) { btnView.Visible = false; lblAddress.Text = "Connection string"; if (System.Configuration.ConfigurationManager.ConnectionStrings[Provider.SourceInfo] != null) { Fwk.DataBase.CnnString c = new Fwk.DataBase.CnnString(Provider.SourceInfo, System.Configuration.ConfigurationManager.ConnectionStrings[Provider.SourceInfo].ConnectionString); cnnstring.Populate(c); cnnstring.Visible = true; } } }
void SetProvider() { lblConnectionType.Text = Provider.ConfigProviderType.ToString(); txtConfigName.Text = Provider.BaseConfigFile; cnnstring.Clear(); if (Provider.ConfigProviderType == ConfigProviderType.local) { cnnstring.Visible = false; lblAddress.Text = "File :"; } if (Provider.ConfigProviderType == ConfigProviderType.sqldatabase) { lblAddress.Text = "Connection string"; if (System.Configuration.ConfigurationManager.ConnectionStrings[Provider.SourceInfo] != null) { Fwk.DataBase.CnnString c = new Fwk.DataBase.CnnString(Provider.SourceInfo, System.Configuration.ConfigurationManager.ConnectionStrings[Provider.SourceInfo].ConnectionString); cnnstring.Populate(c); cnnstring.Visible = true; } } }
public void Populate(Fwk.DataBase.CnnString pCnnString) { txtDatabase.Text = pCnnString.DataSource; txtSQLServer.Text = pCnnString.InitialCatalog; }