Пример #1
0
 /// <summary>
 /// 匯入欄位值集合到來源資料列
 /// </summary>
 /// <param name="originalRow">來源資料列</param>
 public void ImportFieldValues(GEntityRow originalRow)
 {
     foreach (var f in this.FieldNames.Where(x => x.SameTextOr(originalRow.FieldNames)))
     {
         this.SetValue(f, originalRow.GetValue(f));
     }
 }
Пример #2
0
 /// <summary>
 /// 匯入欄位
 /// </summary>
 /// <param name="originalRow">來源資料列</param>
 private void ImportFieldNames(GEntityRow originalRow)
 {
     foreach (GEntityField field in originalRow.Fields)
     {
         this.Fields.Add(field.Key, DataFunc.GetDefaultValue(field.Value.GetType()));
     }
 }
Пример #3
0
 /// <summary>
 /// 建構函式
 /// </summary>
 /// <param name="originalRow">欄位定義</param>
 public GEntityRow(GEntityRow originalRow) : this()
 {
     ImportFieldNames(originalRow);
     ImportFieldValues(originalRow);
 }