예제 #1
0
 internal AutoScripting(AutoScriptingConfig.DatabaseScriptConfigRow configRow, bool includeFileHeaders, bool deletePreExisting, bool zipScripts)
 {
     InitializeComponent();
     this.configRow          = configRow;
     this.includeFileHeaders = includeFileHeaders;
     this.deletePreExisting  = deletePreExisting;
     this.zipScripts         = zipScripts;
 }
예제 #2
0
        private void StartAutoScripting()
        {
            AutoScriptingConfig.DatabaseScriptConfigRow row = this.config.DatabaseScriptConfig[0];
            ListViewItem newDb = new ListViewItem(new string[] { row.ServerName, row.DatabaseName, "Scripting", row.ScriptToPath });

            lstDatabase.Items.Insert(0, newDb);
            ConnectionData data = new ConnectionData();

            data.DatabaseName       = row.DatabaseName;
            data.UserId             = row.UserName;
            data.Password           = row.Password;
            data.SQLServerName      = row.ServerName;
            data.AuthenticationType = (AuthenticationType)Enum.Parse(typeof(AuthenticationType), row.AuthenticationType);
            data.StartingDirectory  = row.ScriptToPath;
            this.Text = "Scripting " + row.DatabaseName + " on " + row.ServerName + " :: ";

            ObjectScriptingConfigData cfgData =
                new ObjectScriptingConfigData(this.deletePreExisting, true, this.zipScripts, this.includeFileHeaders, false, data);

            bgWorker.RunWorkerAsync(cfgData);
        }