Skip to content

Commit

Permalink
398:MDataRow和MDataColumn 的ToTable() 调整适应(新增智能提示)(2016-10-19)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyq1162 committed Oct 18, 2016
1 parent ae6aaba commit e61a33a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
6 changes: 3 additions & 3 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand All @@ -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")]
5 changes: 3 additions & 2 deletions Table/MDataColumn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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++)
{
Expand All @@ -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;
}
Expand Down
8 changes: 4 additions & 4 deletions Table/MDataRow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -317,12 +317,12 @@ public T Get<T>(object key, T defaultValue)
/// </summary>
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;
}
Expand Down
3 changes: 2 additions & 1 deletion 更新记录.txt
Original file line number Diff line number Diff line change
Expand Up @@ -610,4 +610,5 @@
394��XHtmlAction��RSS��OnForeach�IJ�����Dictionary��ΪMDictionary��2016-10-17)
395��JsonHelper ���������������ͻ�ԭ��2016-10-17)
396��JsonHelper ����JsonǶ�����⡣��2016-10-18)
397��MDataTable �Ż������������⡣��2016-10-18)
397��MDataTable �Ż������������⡣��2016-10-18)
398��MDataRow��MDataColumn ��ToTable() ������Ӧ(����������ʾ)��2016-10-19)

0 comments on commit e61a33a

Please sign in to comment.