/// <summary> /// Abrir ou Fechar Banco de Dados Somente /// </summary> /// <param name="AbrirTrue_FechaFalse"></param> private void FU7_ConectarDesconectar(string ConectarDesconectar) { try { switch (ConectarDesconectar) { case ("Conectar"): { ConnectionDataBase.SQLServer_FU_Connection("Open"); btnConectarDesconectar.Text = ("Desconectar"); FU5_EnableDisableComponentes(!true, !true, !true, !true, !true, true, !true, !true); break; } case ("Desconectar"): { ConnectionDataBase.SQLServer_FU_Connection("Close"); btnConectarDesconectar.Text = ("Conectar"); FU5_EnableDisableComponentes(!true, !true, !true, !true, !true, true, !true, !true); break; } default: { break; } } } catch (Exception erroAbrirFecharConexaoSQLServer) { richTextBox_Comentatatios.AppendText("Erro:" + (erroAbrirFecharConexaoSQLServer) + ("\r \n")); } }
private void buttonStatus_Click(object sender, EventArgs e) { FU6_Montar_StringBuilder_SQLConnection(); richTextBox_Comentatatios.Clear(); richTextBox_Comentatatios.AppendText("StringBuilder ---> " + (ConnectionDataBase.SQLServer_1_StringBuilder) + ("\n")); richTextBox_Comentatatios.AppendText("\r"); richTextBox_Comentatatios.AppendText("SQL_String ---> " + (ConnectionDataBase.SQLServer_FU_Connection("Status").ConnectionString.ToString()) + ("\n")); richTextBox_Comentatatios.AppendText("\r"); richTextBox_Comentatatios.AppendText("SQL_Status ---> " + (ConnectionDataBase.SQLServer_FU_Connection("Status").State.ToString()) + ("\n")); }