Beispiel #1
0
        /// <summary>
        /// メソッド(接続が成功したか?)
        /// </summary>
        private bool IsSucessfullConnecion()
        {
            var connectionConfirmer = new ConnectionConfirmer();

            connectionConfirmer.DataSource     = this.DataSource;
            connectionConfirmer.ConnectTimeout = this.ConnectTimeout;
            connectionConfirmer.InitialCatalog = this.IntialCatalog;
            connectionConfirmer.Password       = this.Password;
            connectionConfirmer.UserID         = this.UserID;
            return(connectionConfirmer.IsSucessfullConnecion());
        }
        /// <summary>
        /// メソッド(接続が成功したか?)
        /// </summary>
        private bool IsSucessfullConnecion()
        {
            var connectionConfirmer = new ConnectionConfirmer();

            connectionConfirmer.DataSource     = Convert.ToString(this.txtDataSource.Text);
            connectionConfirmer.ConnectTimeout = this.ConvertToInt32(this.txtConnectTimeout.Text);
            connectionConfirmer.InitialCatalog = Convert.ToString(this.txtIntialCatalog.Text);
            connectionConfirmer.Password       = Convert.ToString(this.txtPassword.Text);
            connectionConfirmer.UserID         = Convert.ToString(this.txtUserID.Text);
            return(connectionConfirmer.IsSucessfullConnecion());
        }