예제 #1
0
 public void InitDescription(TableColumnDescriptionAttribute tableAttribute, string propertyName)
 {
     this.SortOrder     = tableAttribute.Index;
     this.ColumnName    = tableAttribute.ColumnName;
     this.ColumnFormula = tableAttribute.ColumnFormula;
     this.PropertyName  = propertyName;
 }
예제 #2
0
        public TableColumnDescription(PropertyInfo pi)
        {
            pi.NullCheck("pi");

            TableColumnDescriptionAttribute attr = AttributeHelper.GetCustomAttribute <TableColumnDescriptionAttribute>(pi);

            if (attr != null)
            {
                InitDescription(attr, pi.Name);
            }
            else
            {
                this.PropertyName = pi.Name;
                this.ColumnName   = pi.Name;
            }

            this._DataType = pi.PropertyType;
        }