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);
            }
        }
Ejemplo n.º 2
0
 public virtual bool Fill(ScriptStatusData dataClass)
 {
     try {
         this.ScriptName       = dataClass.ScriptName;
         this.ScriptId         = dataClass.ScriptId;
         this.ScriptStatus     = dataClass.ScriptStatus;
         this.ServerName       = dataClass.ServerName;
         this.DatabaseName     = dataClass.DatabaseName;
         this.LastCommitDate   = dataClass.LastCommitDate;
         this.ServerChangeDate = dataClass.ServerChangeDate;
         return(true);
     }
     catch (System.Exception ex) {
         throw new System.ApplicationException("Error in the Auto-Generated: ScriptStatusData.Fill(ScriptStatusData) Method", ex);
     }
 }