Exemplo n.º 1
0
 private void AddCalcColumns(TableProcessing.Table table, params string[] columns)
 {
     foreach (var columnName in columns)
     {
         table.AddColumnIfNotExist(tables.CalcsHydro.Column(columnName));
     }
 }
Exemplo n.º 2
0
        public static void CopyCoeffs(string coeffTypeColumnName,
                                      TableProcessing.Table bazaHydroTable,
                                      TableProcessing.Table coeffsTable,
                                      TableProcessing.Table hydroTable,
                                      params string[] coeffsArray)
        {
            hydroTable.AddColumnIfNotExist(bazaHydroTable.Column(coeffTypeColumnName));

            var coeffsTableRows = coeffsTable.GetRows();

            hydroTable.IterateRows(calcsRow =>
            {
                var query = from coeffsRow in coeffsTableRows
                            where coeffsRow["OI_RnDF"].StringValue
                            == calcsRow[coeffTypeColumnName].StringValue
                            select coeffsRow;

                var neededRow = query.First();

                foreach (var coeffColumnName in coeffsArray)
                {
                    calcsRow.Set(coeffColumnName, neededRow[coeffColumnName]);
                }
            }, null, coeffsArray);
        }