Carrotware.CMS.DBUpdater.DatabaseUpdate.ApplyUpdateIfFound C# (CSharp) Method

ApplyUpdateIfFound() public method

public ApplyUpdateIfFound ( string testQuery, string updateStatement, bool bIgnore ) : DatabaseUpdateResponse
testQuery string
updateStatement string
bIgnore bool
return DatabaseUpdateResponse
        public DatabaseUpdateResponse ApplyUpdateIfFound(string testQuery, string updateStatement, bool bIgnore)
        {
            DatabaseUpdateResponse res = new DatabaseUpdateResponse();
            DataTable table1 = GetTestData(testQuery);

            if (table1.Rows.Count > 0) {
                res.LastException = ExecScriptContents(updateStatement, bIgnore);
                res.Response = "Applied update";
                res.RanUpdate = true;
                return res;
            }

            res.Response = "Did not apply any updates";
            return res;
        }