Esempio n. 1
0
        /// <summary>
        /// Updates the schema.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ButtonUpdateSchema_Click(object sender, EventArgs e)
        {
            var presenter    = new OptionsPresenter();
            var scriptOutput = presenter.UpdateSchema(Options.ConnectionString, Options.CommandTimeoutSeconds);

            MessageBox.Show(String.Join(Environment.NewLine, scriptOutput), SqlServerStrings.SchemaUpdateTitle);
        }
Esempio n. 2
0
        /// <summary>
        /// Tests the connection to the SQL Server indicated
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ButtonTestConnection_Click(object sender, EventArgs e)
        {
            var presenter    = new OptionsPresenter();
            var errorMessage = presenter.TestConnection(Options.ConnectionString);

            MessageBox.Show(errorMessage == null
                ? SqlServerStrings.ConnectionStringOK
                : String.Format(SqlServerStrings.CannotConnectToDatabase, errorMessage),
                            SqlServerStrings.TestConnection);
        }