public void LoadAllTables(){conn.Open(); foreach (FieldInfo SchemaField in this.GetType().GetFields()) if (SchemaField.GetValue(this) is SchemaBase) foreach (FieldInfo TableField in SchemaField.GetValue(this).GetType().GetFields()) if (TableField.GetValue(SchemaField.GetValue(this)) is TableBase) ((TableBase)TableField.GetValue(SchemaField.GetValue(this))).SelectAll(); conn.Close(); }
public void AssignTableNames(){foreach (FieldInfo SchemaField in this.GetType().GetFields()) if (SchemaField.GetValue(this) is SchemaBase) foreach (FieldInfo TableField in SchemaField.GetValue(this).GetType().GetFields()) if (TableField.GetValue(SchemaField.GetValue(this)) is TableBase) { ((TableBase)TableField.GetValue(SchemaField.GetValue(this))).TableName="["+SchemaField.Name+"].["+TableField.Name+"]"; ((TableBase)TableField.GetValue(SchemaField.GetValue(this))).tableSet=this; } }