diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index f80ec37a..6b541e37 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ [assembly: AssemblyTitle("CYQ.Data 数据层(ORM)框架 V5 版本")] [assembly: AssemblyDescription("论坛:http://www.cyqdata.com/cyqdata")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("秋式软件 (2016-10-18)")] +[assembly: AssemblyCompany("秋式软件 (2016-10-19)")] [assembly: AssemblyProduct("CYQ.Data 数据层(ORM)框架 V5 版本")] [assembly: AssemblyCopyright("版权所有 (C) 秋式软件 2010-2020")] [assembly: AssemblyTrademark("CYQ.Data")] @@ -31,5 +31,5 @@ // // 可以指定所有这些值,也可以使用“修订号”和“内部版本号”的默认值, // 方法是按如下所示使用“*”: -[assembly: AssemblyVersion("5.6.6.8")] -[assembly: AssemblyFileVersion("5.6.6.8")] +[assembly: AssemblyVersion("5.6.6.9")] +[assembly: AssemblyFileVersion("5.6.6.9")] diff --git a/Table/MDataColumn.cs b/Table/MDataColumn.cs index a6464d2e..b8a50c47 100644 --- a/Table/MDataColumn.cs +++ b/Table/MDataColumn.cs @@ -332,7 +332,7 @@ public MDataTable ToTable() dt.Columns.Add("FKTableName"); dt.Columns.Add("DefaultValue"); dt.Columns.Add("Description"); - + dt.Columns.Add("TableName"); for (int i = 0; i < Count; i++) { @@ -349,7 +349,8 @@ public MDataTable ToTable() .Set(8, ms.IsForeignKey) .Set(9, ms.FKTableName) .Set(10, ms.DefaultValue) - .Set(11, ms.Description); + .Set(11, ms.Description) + .Set(12, ms.TableName); } return dt; } diff --git a/Table/MDataRow.cs b/Table/MDataRow.cs index eaf134ce..890ab74e 100644 --- a/Table/MDataRow.cs +++ b/Table/MDataRow.cs @@ -317,12 +317,12 @@ public T Get(object key, T defaultValue) /// public MDataTable ToTable() { - MDataTable dt = new MDataTable(TableName); - dt.Columns.Add("ColumnName"); - dt.Columns.Add("Value"); + MDataTable dt = this.Columns.ToTable(); + MCellStruct ms = new MCellStruct("Value", SqlDbType.NVarChar); + dt.Columns.Insert(1, ms); for (int i = 0; i < Count; i++) { - dt.NewRow(true).Set(0, this[i].ColumnName).Set(1, this[i].ToString()); + dt.Rows[i][1].Value = this[i].Value; } return dt; } diff --git "a/\346\233\264\346\226\260\350\256\260\345\275\225.txt" "b/\346\233\264\346\226\260\350\256\260\345\275\225.txt" index a2d7287d..99261bff 100644 --- "a/\346\233\264\346\226\260\350\256\260\345\275\225.txt" +++ "b/\346\233\264\346\226\260\350\256\260\345\275\225.txt" @@ -610,4 +610,5 @@ 394XHtmlActionRSSOnForeachIJDictionaryΪMDictionary2016-10-17) 395JsonHelper ͻԭ2016-10-17) 396JsonHelper JsonǶ⡣2016-10-18) -397MDataTable Ż⡣2016-10-18) \ No newline at end of file +397MDataTable Ż⡣2016-10-18) +398MDataRowMDataColumn ToTable() Ӧ(ʾ)2016-10-19) \ No newline at end of file