Exemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            Source source = (Source)(sourceList.SelectedItem);
            Target target = (Target)(targetList.SelectedItem);
            Configuration config = (Configuration)(configurationList.SelectedItem);

            if (source != null && target != null && config != null)
            {
                if (source.connectionString.ToUpper() != target.connectionString.ToUpper())
                {
                    GoButton.Enabled = false;
                    TransactionScript script = new TransactionScript(source, target, config, doneHandler);
                    scriptThread = new Thread(script.deploy);
                    scriptThread.Start();
                }
                else
                {
                    MessageBox.Show("The source, and target, should not be same.");
                }
            }
            else
            {
                MessageBox.Show("A source, target, and configuration must be selected before a deployment can be made.");
            }
        }