Exemplo n.º 1
0
    private static DataTable GetTables(IImportSession session)
    {
        DataTable dt = new();

        dt.Columns.Add("source_table", typeof(SourceTable));
        dt.Columns.Add("display_name", typeof(string));
        dt.Columns.Add("to_be_imported", typeof(bool));
        dt.BeginLoadData();
        foreach (var(schema, table) in session.TableNames)
        {
            var sourceTable = SourceTable.FromTable(schema, table);
            dt.LoadDataRow(new object[] { sourceTable, sourceTable.DisplayText, false }, true);
        }
        dt.EndLoadData();
        return(dt);
    }