public static bool HasCruiseErrors(this CruiseDatastore dal, out string[] errors)
        {
            bool hasErrors = false;
            var  errorList = new List <string>();

            if (dal.HasForeignKeyErrors(null))
            {
                errorList.Add("File contains Foreign Key errors");
                hasErrors = true;
            }

            if (HasMismatchSpecies(dal))
            {
                errorList.Add("Tree table has mismatch species codes");
                hasErrors = true;
            }

            if (dal.HasSampleGroupUOMErrors())
            {
                errorList.Add("Sample Group table has invalid mix of UOM");
                hasErrors = true;
            }

            if (dal.HasBlankCountOrMeasure())
            {
                errorList.Add("Tree table has record(s) with blank Count or Measure value");
                hasErrors = true;
            }
            if (dal.HasBlankDefaultLiveDead())
            {
                errorList.Add("Sample Group table has record(s) with blank default live dead vaule");
                hasErrors = true;
            }
            if (dal.HasBlankLiveDead())
            {
                errorList.Add("Tree table has record(s) with blank Live Dead value");
                hasErrors = true;
            }
            if (dal.HasBlankSpeciesCodes())
            {
                dal.Execute(
                    @"Update Tree
                SET Species =
                    (Select Species FROM TreeDefaultValue
                        WHERE TreeDefaultValue.TreeDefaultValue_CN = Tree.TreeDefaultValue_CN)
                WHERE ifnull(Tree.Species, '') = ''
                AND ifnull(Tree.TreeDefaultValue_CN, 0) != 0;");
                if (dal.HasBlankSpeciesCodes())
                {
                    errorList.Add("Tree table has record(s) with blank species or no tree default");
                    hasErrors = true;
                }
            }

            if (dal.HasOrphanedStrata())
            {
                errorList.Add("Stratum table has record(s) that have not been assigned to a cutting unit");
                hasErrors = true;
            }
            if (dal.HasStrataWithNoSampleGroups())
            {
                errorList.Add("Stratum table has record(s) that have not been assigned any sample groups");
                hasErrors = true;
            }

            errors = errorList.ToArray();
            return(hasErrors);
        }