Exemplo n.º 1
0
 private void AddCustomDataToLinesTable(LinesLayer layer, SpatialDataTable linesTable)
 {
     using (var dtCustom = MakeCustomData(layer.RecordSource))
         foreach (IReportScriptContext sc in DataTableReportScriptContext.Foreach(dtCustom))
         {
             AddLinesRow(layer, linesTable, sc);
         }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Loops through all rows of a data table.
        /// </summary>
        /// <param name="dataTable">The data table to loop through.</param>
        /// <returns>The context for each row.</returns>
        public static IEnumerable <IReportScriptContext> Foreach(DataTable dataTable)
        {
            var sc = new DataTableReportScriptContext(dataTable);

            for (sc._rowIndex = 0; sc._rowIndex < sc._dataTable.Rows.Count; ++sc._rowIndex)
            {
                yield return(sc);
            }
        }