Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Last active November 22, 2018 15:25
Show Gist options
  • Save bjoerntx/60dbd386344d1ec9b3620301235d8e68 to your computer and use it in GitHub Desktop.
Save bjoerntx/60dbd386344d1ec9b3620301235d8e68 to your computer and use it in GitHub Desktop.
DataSourceManager dsManager;
Report report;
private void LoadData()
{
List<Report> reports = new List<Report>();
report = new Report()
{
Name = "Test Report",
Products = new List<Product>() {
new Product() { Name = "TX Text Control Product 1", Price = 634.34F },
new Product() { Name = "TX Text Control Product 2", Price = 34.34F },
}
};
reports.Add(report);
// create a new DataSourceManager and load the data object
dsManager = new DataSourceManager();
dsManager.LoadSingleObject(report);
// display the possible merge block tables in a combo box
cbMergeBlocks.Text = "";
cbMergeBlocks.DataSource =
dsManager.PossibleMergeBlockTables.ToList<DataTableInfo>();
cbMergeBlocks.DisplayMember = "TableName";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment