C# Class CRL.Attribute.FieldAttribute

Inheritance: System.Attribute
Datei anzeigen Open project: hubro-xx/CRL2 Class Usage Examples

Public Properties

Property Type Description
ColumnType string
Constraint string
ConstraintField string
ConstraintResultField string
ConstraintType System.Type
DefaultValue string
FieldIndexType FieldIndexType
Length int
MappingField bool
NotNull bool
VirtualField string

Private Properties

Property Type Description
GetTableFieldFormat string
GetValue object
SetFieldQueryScript void
SetPropertyInfo void
SetValue void

Public Methods

Method Description
Clone ( ) : FieldAttribute
ToString ( ) : string

Private Methods

Method Description
GetTableFieldFormat ( string table, string fileld ) : string

按表名格式化字段名

GetValue ( object obj ) : object

获取对象属性值

SetFieldQueryScript ( string prefix, bool usePrefix, bool useAliasesName ) : void

设置字段查询语法

SetPropertyInfo ( PropertyInfo _propertyInfo ) : void

设置对象属性值

SetValue ( object obj, object value ) : void

设置对象属性值

Method Details

Clone() public method

public Clone ( ) : FieldAttribute
return FieldAttribute

ToString() public method

public ToString ( ) : string
return string

Property Details

ColumnType public_oe property

自定义数据库字段类型,如 varchar(50)
public string ColumnType
return string

Constraint public_oe property

子表查询附加条件 如:CategoryCode=1
public string Constraint
return string

ConstraintField public_oe property

约束字段 格式:$CategoryCode[当前类型字段]=SequenceCode[关联表字段]
public string ConstraintField
return string

ConstraintResultField public_oe property

关联表要取出的字段 只是字段时使用
public string ConstraintResultField
return string

ConstraintType public_oe property

关联表类型 只是字段时使用 typeof(ClassA)
public Type,System ConstraintType
return System.Type

DefaultValue public_oe property

默认值
public string DefaultValue
return string

FieldIndexType public_oe property

索引类型
public FieldIndexType FieldIndexType
return FieldIndexType

Length public_oe property

长度,超过3000字段类型将会设为ntext 若是需要指定长度,请赋值 默认30
public int Length
return int

MappingField public_oe property

是否映射该字段 为false时则不参与查询
public bool MappingField
return bool

NotNull public_oe property

是否为空
public bool NotNull
return bool

VirtualField public_oe property

自动转换虚拟字段 如year(addtime)
public string VirtualField
return string