Exemplo n.º 1
0
 public SprocTestForm(Database cfg, ConnectionData connData, string configFileName)
     : this()
 {
     this.cfg      = cfg;
     this.connData = connData;
     this.configurationFileName = configFileName;
 }
        public void RetrieveStatus()
        {
            DateTime commitDate;
            DateTime serverChangeDate;

            Connection.ConnectionData connData;
            string databaseName;

            foreach (SqlSyncBuildData.ScriptRow row in buildData.Script)
            {
                databaseName = ConnectionHelper.GetTargetDatabase(row.Database, dbOverrides);

                if (baseDatabase == null)
                {
                    baseDatabase = databaseName;
                }

                ScriptStatusData dat = new ScriptStatusData();
                connData = new SqlSync.Connection.ConnectionData(this.serverName, databaseName);

                ScriptStatusType stat = StatusHelper.DetermineScriptRunStatus(row, connData, this.projectFilePath, true, dbOverrides, out commitDate, out serverChangeDate);
                dat.Fill(row);
                dat.DatabaseName     = databaseName;
                dat.ServerName       = this.serverName;
                dat.ServerChangeDate = serverChangeDate;
                dat.LastCommitDate   = commitDate;
                dat.ScriptStatus     = stat;

                this.status.Add(dat);
            }
        }
Exemplo n.º 3
0
        private void settingsControl1_ServerChanged(object sender, string serverName, string username, string password, AuthenticationType authType)
        {
            Connection.ConnectionData oldConnData = new Connection.ConnectionData();
            this.connData.Fill(oldConnData);
            this.Cursor = Cursors.WaitCursor;

            this.connData.SQLServerName = serverName;
            if (!string.IsNullOrWhiteSpace(username) && (!string.IsNullOrWhiteSpace(password)))
            {
                this.connData.UserId   = username;
                this.connData.Password = password;
            }
            this.connData.AuthenticationType = authType;
            this.connData.ScriptTimeout      = 5;

            try
            {
                this.databaseList = SqlSync.DbInformation.InfoHelper.GetDatabaseList(this.connData);
                this.SyncForm_Load(null, EventArgs.Empty);
                BindDatabaseListDropDown(this.databaseList);
            }
            catch
            {
                MessageBox.Show("Error retrieving database list. Is the server running?", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                this.connData = oldConnData;
                this.settingsControl1.Server = oldConnData.SQLServerName;
            }


            this.Cursor = Cursors.Default;
        }
Exemplo n.º 4
0
 public TestManager(string fileName, string server) : this()
 {
     this.fileName = fileName;
     this.connData = new ConnectionData();
     this.connData.SQLServerName      = server;
     this.connData.AuthenticationType = AuthenticationType.Windows;
     this.connData.ScriptTimeout      = 100;
 }
Exemplo n.º 5
0
 public TestManager(SprocTest.Configuration.Database cfg, ConnectionData connData) : this()
 {
     this.cfg      = cfg;
     this.connData = connData;
 }