/// <summary> /// given a MODSIM output column name (in the access database) /// returns what table to read in modsim. /// </summary> private string ModsimTableName(string columnName) { string tableName; if (columnName == "Hydro_State_Res") { return(tableName = "RESOutput"); } if (columnName == "Hydro_State_Dem") { return(tableName = "DemOutput"); } if (m_outputTablesInfo == null) { m_outputTablesInfo = AccessDB.ReadTable(m_databaseName, "OutputTablesInfo"); } string sql = "OutputName = '" + columnName + "'"; DataTable tbl1 = DataTableUtility.Select(m_outputTablesInfo, sql, ""); if (tbl1.Rows.Count == 0) { throw new Exception("Error: A column named '" + columnName + "' could not be found in the modsim output file: " + this.m_databaseName); } tableName = tbl1.Rows[0]["Object"].ToString(); Console.WriteLine(tableName); Logger.WriteLine("tableName = " + tableName); return(tableName); }