private void button1_Click(object sender, EventArgs e) { SqlConBuilder.Command.CommandText = "SELECT TOP (10) [AddressID],[AddressLine1],[AddressLine2]" + ",[City],[StateProvinceID],[PostalCode],[rowguid],[ModifiedDate] FROM[TSOOPEX].[Person].[Address]"; SqlConBuilder.Read(ref this.dataGridView1); }
private void button2_Click(object sender, EventArgs e) { SqlConBuilder.ConnectionStringBuilder.UserID = LoginField.Text; SqlConBuilder.ConnectionStringBuilder.Password = PassField.Text; if (SqlConBuilder.ConnectionTest() == true) { MessageBox.Show("Соединение установлено"); } else { MessageBox.Show("Ошибка подключения"); } }