Exemplo n.º 1
0
        public virtual string Compile(TabularData data)
        {
            Data          = data;
            StringBuilder = new StringBuilder();

            Compile();

            return(StringBuilder.ToString());
        }
Exemplo n.º 2
0
        private TabularData ParseDataGrid()
        {
            var dataRows = ((DataTable)_grid.DataSource).Rows;

            var resultRows = Enumerable.Range(0, dataRows.Count).Select(_ => new List <string>()).ToList();

            for (int i = 0; i < dataRows.Count; i++)
            {
                resultRows[i] = dataRows[i].ItemArray.Select(obj => obj.ToString()).ToList();
            }
            return(TabularData.FromRows(resultRows));
        }