Beispiel #1
0
        /// <summary>
        /// Creates a new IODPDataTable object
        /// </summary>
        public IODPDataTable(DataTable dataTable)
        {
            DataTable = dataTable;

            List <string> columnNames = GetColumnNames(dataTable);
            string        match       = string.Empty;

            CinnamonList lookupList = new CinnamonList("Expedition");

            match            = lookupList.FindInList(columnNames);
            ExpeditionColumn = string.IsNullOrEmpty(match)? ExpeditionColumn : match;

            lookupList = new CinnamonList("Site");
            match      = lookupList.FindInList(columnNames);
            SiteColumn = string.IsNullOrEmpty(match) ? SiteColumn : match;

            lookupList = new CinnamonList("Hole");
            match      = lookupList.FindInList(columnNames);
            HoleColumn = string.IsNullOrEmpty(match) ? HoleColumn : match;

            lookupList = new CinnamonList("Core");
            match      = lookupList.FindInList(columnNames);
            CoreColumn = string.IsNullOrEmpty(match) ? CoreColumn : match;

            lookupList = new CinnamonList("Type");
            match      = lookupList.FindInList(columnNames);
            TypeColumn = string.IsNullOrEmpty(match) ? TypeColumn : match;

            lookupList    = new CinnamonList("Section");
            match         = lookupList.FindInList(columnNames);
            SectionColumn = string.IsNullOrEmpty(match) ? SectionColumn : match;

            lookupList   = new CinnamonList("Offset");
            match        = lookupList.FindInList(columnNames);
            OffsetColumn = string.IsNullOrEmpty(match) ? OffsetColumn : match;

            lookupList      = new CinnamonList("TopOffset");
            match           = lookupList.FindInList(columnNames);
            TopOffsetColumn = string.IsNullOrEmpty(match) ? TopOffsetColumn : match;

            lookupList         = new CinnamonList("BottomOffset");
            match              = lookupList.FindInList(columnNames);
            BottomOffsetColumn = string.IsNullOrEmpty(match) ? BottomOffsetColumn : match;

            lookupList     = new CinnamonList("SampleID");
            match          = lookupList.FindInList(columnNames);
            SampleIDColumn = string.IsNullOrEmpty(match) ? SampleIDColumn : match;
        }
Beispiel #2
0
        public static bool DataRowContainsDescription(DataRow dataTableRow, IODPDataTable dataTable)
        {
            CinnamonList noDataEntriesList = new CinnamonList("NoSampleEntries");

            return(!noDataEntriesList.FindInList(dataTableRow[dataTable.SampleIDColumn].ToString().ToLower()) ? true : false);
        }