Acme.PROJECTNAME.Install.IdentifyDatabaseForm.buttonConnectionTestConnection_Click C# (CSharp) Method

buttonConnectionTestConnection_Click() private method

private buttonConnectionTestConnection_Click ( object sender, System e ) : void
sender object
e System
return void
		private void buttonConnectionTestConnection_Click(object sender, System.EventArgs e)
		{
			string connectString = SqlServers.BuildConnectionString(radioButtonConnectionIntegratedSecurity.Checked, comboBoxConnectionDatabaseName.Text, comboBoxConnectionServerName.Text, textBoxConnectionUserName.Text, textBoxConnectionPassword.Text);
			bool valid = SqlServers.TestConnectionString(connectString);
			if (valid)
			{
				MessageBox.Show("Connection Succeeded.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
			}
			else
			{
				MessageBox.Show("The information does not describe a valid connection string.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
			}

		}