public override void construct(object[] resources) { List <object> reslist = resources.getFlatList <object>(typeof(PropertyCollectionList), typeof(PropertyCollection)); PropertyCollectionList dataSet = reslist.Pop <PropertyCollectionList>(); // reslist[0] as PropertyCollectionList; //.getFirstOfType<PropertyCollectionList>(false, null); PropertyCollection dbInfo = reslist.Pop <PropertyCollection>(); // reslist.getFirstOfType<PropertyCollection>(false, null); PropertyCollectionList directAccessDataList = reslist.Pop <PropertyCollectionList>(); //reslist.getFirstOfType<PropertyCollectionList>(false, null); theme = reslist.getFirstOfType <styleTheme>(false, null); documentTitle = "DB Dump report :: " + (dbInfo.getProperString(templateFieldDataTable.data_dbname) + (" @ ") + (dbInfo.getProperString(templateFieldDataTable.data_dbhost))); documentDescription = "Database diagnostic dump -- all tables found at {{{data_dbname}}}"; documentBottomLine = "Tables :: " + (dbInfo.getProperString(templateFieldDataTable.data_tablescount) + " DB User :: " + (dbInfo.getProperString(templateFieldDataTable.data_dbuser))); //dataSet[0].getProperObject<PropertyCollectionList>(templateFieldDataTable.data_accesslist); overview = new pagePresetDataTableReportOverview(documentTitle, documentDescription, documentBottomLine); pages.Add(overview, this); overview.construct(resources); serviceDocumentFolderReadmePage readme = new serviceDocumentFolderReadmePage(name, documentTitle, documentDescription, documentBottomLine); pages.Add(readme, this); readme.construct(resources); foreach (PropertyCollection data in dataSet) { DataTable output = data.getProperObject <DataTable>(templateFieldDataTable.data_table); metaDataTablePage tablePage = new metaDataTablePage(); pages.Add(tablePage, this); tablePage.construct(resources); acePaletteRole rl = theme.palletes.paletteRoleWheel.next(); tablePage.settings.mainColor = rl; //data[templateFieldDataTable.data_accesslist] = directAccessList; //DataTable table = component.settings.dbc.execute("SELECT * FROM " + dba.tableName); //dba.AppendDataFields(data); //table.AppendDataFields(data); //dbDump.addDbTableReportPage(table); } //List<DataTable> dts = reslist.getAllOfType<DataTable>(false); //foreach (Object dt in dts) //{ // metaDataTablePage tmp = new metaDataTablePage(); // pages.Add(tmp, this); // tmp.construct(dt); //} sortChildren(); //throw new NotImplementedException(); }
/// <summary> /// Initializes a new instance of the <see cref="documentDatabaseReport"/> class. /// </summary> /// <param name="data">The data.</param> public documentDatabaseReport(PropertyCollection data) { name = data.getProperString(templateFieldDataTable.data_dbname); header.title = "Database [".t(templateFieldDataTable.data_dbname) + "] report"; header.description = "Host: ".t(templateFieldDataTable.data_dbhost) + " Username: "******"Total tables: ".t(templateFieldDataTable.data_tablescount) + ""; overview = new pagePresetDataTableReportOverview(header.name, header.description, footer.bottomLine); //tables = __tables.getFlatList<DataTable>(); // servicePages.Add(new pagePresetGeneralReadme()); //servicePages.Add(new pagePresetDataTableReportOverview()); //path.filenameWithoutExtension = __title.getFilename(); //path.deployFormat(format); }