public SoilSurveyMaterialsTable(MagikHeader header, MagikDataLine line, MagikToRowsDictionary magikToRowsDictionary)//:base(StringComparer.InvariantCultureIgnoreCase)
        {
            string[] cells = line.Cells;
            for (int i = 0; i < cells.Length; i++)
            {
                string columnName = header.ColumnNames[i];
                string cellValue  = cells[i];

                // parse materials:
                if (magikToRowsDictionary.ContainsKey(columnName))
                {
                    // only parse the material if it's not empty:
                    if (string.IsNullOrEmpty(cellValue))
                    {
                        continue;
                    }
                    if (string.IsNullOrEmpty(cellValue.Trim()))
                    {
                        continue;
                    }

                    string materialColName = magikToRowsDictionary[columnName];
                    this[materialColName] = cellValue;
                }
            }
        }
Example #2
0
        //private int SurveyId { get; set; }

        //public int ImportedFileId { get; set; }

        #region Public

        public Importer(MagikToRowsDictionary magikToRowsDictionary)
        {
            m_MagikToRowsDictionary = magikToRowsDictionary;
        }