Exemplo n.º 1
0
 protected void UpdateTableSelectionNamesFromSchema(ObjectDataFormatter objectDataFormatter, Database.Schema schema)
 {
     if (schema == null)
     {
         m_TableNames    = new string[1];
         m_TableNames[0] = "none";
         m_Tables        = new Database.Table[1];
         m_Tables[0]     = null;
         return;
     }
     m_TableNames    = new string[schema.GetTableCount() + 1];
     m_Tables        = new Database.Table[schema.GetTableCount() + 1];
     m_TableNames[0] = "none";
     m_Tables[0]     = null;
     for (long i = 0; i != schema.GetTableCount(); ++i)
     {
         var  tab      = schema.GetTableByIndex(i);
         long rowCount = tab.GetRowCount();
         m_TableNames[i + 1] = (objectDataFormatter.ShowPrettyNames ? tab.GetDisplayName() : tab.GetName()) + " (" + (rowCount >= 0 ? rowCount.ToString() : "?") + ")";
         m_Tables[i + 1]     = tab;
     }
 }
Exemplo n.º 2
0
 public override Database.Table GetTableByIndex(int index)
 {
     return(SchemaToDisplay.GetTableByIndex(index));
 }