using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Attach_Database
{
    public partial class Form2 : Form
    {
        public Form2()
        {
            InitializeComponent();
        }

        private void btnContinue_Click(object sender, EventArgs e)
        {
            string ConnectionInfo = @"Data Source=" + txtDataSouce.Text + ";Initial Catalog=" + txtInitialCatalog.Text + ";User Id=" + txtUserId.Text + ";Password=" + txtPassword.Text;
            Form1.ConnectionString = ConnectionInfo;
            Form1 f = new Form1();
            
            f.Show();
            Hide();
            
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void Form2_Load(object sender, EventArgs e)
        {
            txtDataSouce.Text = Environment.MachineName + "\\";
            txtInitialCatalog.Text = "master";
            txtUserId.Text = "sa";
        }
    }
}
