Exemplo n.º 1
0
        public void SetTable(string tableName, DataTableSetting setting)
        {
            var table = new DataTable(tableName);

            PrepareTable(table, setting);
            _dataSet.Tables.Add(table);
        }
Exemplo n.º 2
0
 private static void PrepareTable(DataTable table, DataTableSetting setting)
 {
     table.ExtendedProperties.Add("_Setting_", setting);
     table.ExtendedProperties["_HeaderIsComplete_"] = false;
     foreach (var row in setting.ColumnDefinitions)
     {
         table.Columns.Add(new DataColumn
         {
             ColumnName = row.Key.ToString(),
             DataType   = typeof(string)
         });
     }
 }
 private static void PrepareTable(DataTable table, DataTableSetting setting)
 {
     table.ExtendedProperties.Add("_Setting_", setting);
     table.ExtendedProperties["_HeaderIsComplete_"] = false;
     foreach (var row in setting.ColumnDefinitions)
         table.Columns.Add(new DataColumn
         {
             ColumnName = row.Key.ToString(),
             DataType = typeof(string)
         });
 }
 public void SetTable(string tableName, DataTableSetting setting)
 {
     var table = new DataTable(tableName);
     PrepareTable(table, setting);
     _dataSet.Tables.Add(table);
 }