예제 #1
0
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();
                           }
예제 #2
0
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;
                                           }   
                              }