/// <summary> /// Constructs the specified resources. /// </summary> /// <param name="resources"></param> public override void construct(object[] resources) //compose(IMetaComposer composer, metaDocumentTheme theme, PropertyCollection data, params object[] resources) { List <object> reslist = resources.getFlatList <object>(typeof(PropertyCollectionList)); PropertyCollectionList dataSet = resources[0] as PropertyCollectionList; //reslist.getFirstOfType<PropertyCollectionList>(false, null); PropertyCollectionList dbInfo = resources[1] as PropertyCollectionList;; // reslist.getFirstOfType<PropertyCollection>(false, null); PropertyCollection directAccessDataList = resources[2] as PropertyCollection; var theme = reslist.getFirstOfType <styleTheme>(false, null); documentDatabaseReport report = new documentDatabaseReport(); documents.Add(report, this); report.construct(resources); //foreach (PropertyCollection data in dataSet) { // DataTable output = data.getProperObject<DataTable>(templateFieldDataTable.data_table); // //data[templateFieldDataTable.data_accesslist] = directAccessList; // //DataTable table = component.settings.dbc.execute("SELECT * FROM " + dba.tableName); // //dba.AppendDataFields(data); // //table.AppendDataFields(data); // //dbDump.addDbTableReportPage(table); //} //foreach (metaDocument pg in documents) //{ // pg.construct(resources); //} //PropertyCollection extraData = new PropertyCollection(); }
/// <summary> /// Adds the database table report page, automatically creates database document and overview page /// </summary> /// <param name="table">The table.</param> public void addDbTableReportPage(DataTable table) { string db_name = table.ExtendedProperties.getProperString(templateFieldDataTable.data_dbname); string table_name = table.ExtendedProperties.getProperString(templateFieldDataTable.data_tablenamedb); // ako nema dokumenta stvara ga documentDatabaseReport dbDocument = documents[db_name] as documentDatabaseReport; if (dbDocument == null) { dbDocument = new documentDatabaseReport(table.ExtendedProperties); documents.Add(dbDocument, this); } /// ako nema tranice pravi je pagePresetTableReport dbPage = dbDocument[table_name] as pagePresetTableReport; if (dbPage == null) { dbPage = new pagePresetTableReport(table); dbDocument.pages.Add(dbPage, dbDocument); } }