void CheckAddTable(DataTable table) { //if( ( table ) != null ) // Log.log( "added " + ( table ).TableName ); foreach (Attribute attr in table.GetType().GetCustomAttributes(true)) { //Log.log( "Checking " + attr.ToString() + " in " + e.Element.ToString() ); { SQLPersistantTable persist = attr as SQLPersistantTable; if (null != persist) { AddTable(table); DataTable db_DataTable = table; if (db_DataTable != null) { if (persist.FillMethod != "None") { // this list is used for begin/end load data... TableFiller.AddLast(db_DataTable); TableFillers.Add(new TableDefaultFiller(persist.DefaultFill, persist.Fill, db_DataTable)); } else { TableNoAutoFill.Add(db_DataTable); } } break; } } } }
public static string GetCompleteTableName(DataTable table) { String name = null; if (table.DataSet != null && table.DataSet.Prefix != null) { foreach (Attribute attr in table.GetType().GetCustomAttributes(true)) { //Log.log( "Checking " + attr.ToString() + " in " + e.Element.ToString() ); SQLPersistantTable persist = attr as SQLPersistantTable; if (null != persist) { name = table.DataSet.Prefix; } } } if (table.Prefix != null) { name += table.Prefix; } name += table.TableName; return(name); }