public static string GetFormattedPage(string table, string exportPath, string containerName, string gscp, bool isHtmlReport) { DatabaseHandler db = new DatabaseHandler(); string columns = DatabaseTableHelper.GetTableColumns(table); string page = DatatableToHtml.ConvertToHtml(db.GetRowsFromColumns(table: table, columns: columns), exportPath, containerName); return ReplaceReportDetails(page, gscp, isHtmlReport); }
private static DataTable GetMergedDataTable() { DatabaseHandler db = new DatabaseHandler(); DataTable merged = new DataTable(); foreach (string table in DatabaseTableHelper.GetTables()) { string columns = DatabaseTableHelper.GetTableColumns(table); DataTable dt = db.GetRowsFromColumns(table: table, columns: columns); merged.Merge(dt, true, MissingSchemaAction.Add); } merged.TableName = "merged"; DataView view = new DataView(merged); view.Sort = "date asc, time asc"; DataTable sortedTable = view.ToTable(); return sortedTable; }
private DataTable GetMergedDataTable() { DatabaseHandler db = new DatabaseHandler(); DataTable merged = new DataTable(); foreach (string table in GetSelectedTables()) { string columns = DatabaseTableHelper.GetTableColumns(table); DataTable dt = db.GetRowsFromColumns(table: table, columns: columns); merged.Merge(dt, true, MissingSchemaAction.Add); } //added if(uiMergeCaseNotesCheckBox.Checked) { DataTable dt = new DatabaseHandler().GetRowsFromColumns("case_notes", "", "date", "time", "note"); merged.Merge(dt, true, MissingSchemaAction.Add); } //end ad merged.TableName = "merged"; DataView view = new DataView(merged); view.Sort = "date asc, time asc"; DataTable sortedTable = view.ToTable(); return sortedTable; }