Пример #1
0
        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);
        }
Пример #2
0
 public MDQuery_TableColumn(MDModel_Table_Column columnDefine)
 {
     this.ColumnAlgorithm = columnDefine.ColumnAlgorithm;
     this.ColumnAlias     = columnDefine.ColumnAlias;
     this.ColumnDataType  = columnDefine.ColumnDataType;
     if (columnDefine.ColumnDefine == null)
     {
         this.ColumnLength  = 0;
         this.RefDMB        = "";
         this.DisplayFormat = "";
         this.DisplayLength = 80;
     }
     else
     {
         if (columnDefine.ColumnType == QueryColumnType.CalculationColumn)
         {
             this.ColumnLength  = 1;
             this.DisplayFormat = "";
             this.RefDMB        = "";
             this.DisplayLength = 80;
         }
         else
         {
             this.ColumnLength  = columnDefine.ColumnDefine.TableColumn.Length;
             this.DisplayFormat = columnDefine.ColumnDefine.TableColumn.DisplayFormat;
             this.RefDMB        = columnDefine.ColumnDefine.TableColumn.RefDMB;
             this.DisplayLength = (columnDefine.ColumnDefine.TableColumn.ColWidth > 10) ? columnDefine.ColumnDefine.TableColumn.ColWidth : 80;
         }
     }
     this.ColumnName   = columnDefine.ColumnName;
     this.ColumnTitle  = columnDefine.ColumnTitle;
     this.ColumnType   = columnDefine.ColumnType;
     this.DisplayOrder = columnDefine.DisplayOrder;
     this.TableName    = columnDefine.TableName;
     this.Source       = new MDQuery_ColumnSource(columnDefine.QueryModelName, columnDefine.TableName, columnDefine.ColumnName);
 }