Пример #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="tables"></param>
 private void ConvertGTables(GInstanceType instanceType)
 {
     foreach (GEntityTable table in this.OriginalEntitySet.Tables)
     {
         this.EntityTables.Add(new GEntityTable <T>(table, instanceType), table);
     }
 }
Пример #2
0
 /// <summary>
 /// 動態建立 Entity 資料列。
 /// </summary>
 /// <param name="instanceType">動態載入物件的型別描述。</param>
 /// <returns></returns>
 public static GEntityRow CreateEntityRow(GInstanceType instanceType)
 {
     //取得組件的完整路徑
     var assemblyFilePath = FileFunc.PathCombine(FileFunc.GetAssemblyPath(), instanceType.AssemblyFile);
     //動態載入組件,建立指定類別的物件
     var assemblyLoader = new GAssemblyLoader(assemblyFilePath);
     return (GEntityRow)assemblyLoader.CreateInstance(instanceType.TypeName, new object[] { });
 }
Пример #3
0
 /// <summary>
 /// 轉換為Entity資料列
 /// </summary>
 private void ConvertToGEntityRow(GInstanceType instanceType)
 {
     foreach (GEntityRow entity in OriginalEntityTable.Rows)
     {
         var realEntity = (T)DefineFunc.CreateEntityRow(instanceType);
         this.EntityRows.Add(entity.ToRealEntity(realEntity), entity);
     }
 }
Пример #4
0
 /// <summary>
 /// 動態建立功能層級商業邏輯物件。
 /// </summary>
 /// <param name="instanceType">動態載入物件的型別描述。</param>
 /// <param name="sessionGuid">連線識別。</param>
 /// <param name="progID">程式代碼。</param>
 public static IBusinessLogic CreateBusinessLogic(GInstanceType instanceType, Guid sessionGuid, string progID)
 {
     return CreateBusinessLogic(instanceType.AssemblyFile, instanceType.TypeName, sessionGuid, progID);
 }
Пример #5
0
 /// <summary>
 /// 建構函式
 /// </summary>
 /// <param name="entityTable"></param>
 public GEntityTable(GEntityTable entityTable, GInstanceType instanceType) : base()
 {
     this.TableName           = entityTable.TableName;
     this.OriginalEntityTable = entityTable;
     ConvertToGEntityRow(instanceType);
 }
Пример #6
0
 /// <summary>
 /// 建構函式
 /// </summary>
 /// <param name="entitySet"></param>
 public GEntitySet(GEntitySet entitySet, GInstanceType instanceType) : base()
 {
     this.DataSetName       = entitySet.DataSetName;
     this.OriginalEntitySet = entitySet;
 }