예제 #1
0
        private void btnConnect_Click(object sender, EventArgs e)
        {
            var config = new Config
            {
                ServerName   = txtServerName.Text,
                DatabaseName = txtDatabaseName.Text,
                UserName     = txtUserName.Text,
                Password     = txtPassword.Text
            };

            if (checkBoxWindows.Checked)
            {
                ConfigBusiness.WindowsAuthentication(config);
            }
            else
            {
                ConfigBusiness.SqlSeverAuthentication(config);
            }
            Dispose();
        }