public static List <MDModel_Table_Column> GetMDModelColumns(this MD_ViewTable ViewTable)
        {
            List <MDModel_Table_Column> _ret = new List <MDModel_Table_Column>();

            foreach (MD_ViewTableColumn _col in ViewTable.Columns)
            {
                MDModel_Table_Column _newcol = new MDModel_Table_Column(_col);
                _ret.Add(_newcol);
            }
            return(_ret);
        }
Beispiel #2
0
 public MDModel_Table(string modelName, string modelID, MD_ViewTable table)
 {
     TableDefine           = table;
     QueryModelName        = modelName;
     this.ViewTableId      = table.ViewTableID;
     this.ViewId           = modelID;
     this.TableId          = table.TableID;
     this.TableType        = (table.ViewTableType == MDType_ViewTable.MainTable) ? "M" : "F";
     this.TableRelation    = table.RelationString;
     this.IsSingleRelation = (table.ViewTableRelationType == MDType_ViewTableRelation.SingleChildRecord);
     this.DisplayTitle     = table.DisplayTitle;
     this.DisplayOrder     = table.DisplayOrder;
     this.DWDM             = table.DWDM;
     this.FatherID         = table.FatherTableID;
     this.Priority         = table.Priority;
     this.DisplayType      = (table.DisplayType == MDType_DisplayType.FormType) ? 1 : 0;
     this.MainKey          = table.Table.MainKey;
     this.SecretFun        = table.Table.SecretFun;
     this.ExtSecret        = table.Table.ExtSecret;
     this.TableName        = table.TableName;
     this.Columns          = table.GetMDModelColumns();
 }