DataBase.cs 772 B

123456789101112131415161718192021222324252627282930313233
  1. using FastReport.Data;
  2. using System.Collections.Generic;
  3. namespace FastReport.FastQueryBuilder
  4. {
  5. internal class DataBase
  6. {
  7. public List<Table> TableList { get; } = new List<Table>();
  8. public DataConnectionBase dataBase { get; }
  9. public DataBase(DataConnectionBase db)
  10. {
  11. dataBase = db;
  12. try
  13. {
  14. dataBase.CreateAllTables(false);
  15. }
  16. catch
  17. {
  18. }
  19. foreach (TableDataSource tds in dataBase.Tables)
  20. {
  21. TableList.Add(new Table(tds));
  22. }
  23. TableList.Sort((x, y) => x.Name.CompareTo(y.Name));
  24. }
  25. public string GetQuotationChars() => dataBase.GetQuotationChars();
  26. }
  27. }