年度变更建库软件5.0版本
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

172 lines
2.7 KiB

using System.ComponentModel;
using System.Xml.Serialization;
using KGIS.Plugin.LayerProperty.Enum;
using KGIS.Plugin.LayerProperty.Interface;
namespace KGIS.Plugin.LayerProperty.Model
{
public abstract class AbstractField
{
private AbstractTable absTable;
private string name = "";
private string aliasName = "";
private DBDataType dbType;
private IKgisDictionary dictionary;
private FieldKeyType fieldKeyType;
private string defaultValue = "";
private int length;
private string description = "";
private long id;
private int order;
[XmlIgnore]
public AbstractTable TableInfo
{
get
{
return this.absTable;
}
set
{
this.absTable = value;
}
}
[DisplayName("字段名称"), XmlElement]
public string Name
{
get
{
return this.name;
}
set
{
this.name = value;
}
}
[DisplayName("字段描述")]
public string AliasName
{
get
{
return this.aliasName;
}
set
{
this.aliasName = value;
}
}
[XmlElement]
public DBDataType DbDataType
{
get
{
return this.dbType;
}
set
{
this.dbType = value;
}
}
public string DefaultValue
{
get
{
return this.defaultValue;
}
set
{
this.defaultValue = value;
}
}
[XmlIgnore]
public IKgisDictionary Dictionary
{
get
{
return this.dictionary;
}
set
{
this.dictionary = value;
}
}
[XmlElement]
public string Description
{
get
{
return this.description;
}
set
{
this.description = value;
}
}
[XmlElement]
public FieldKeyType FieldKeyType
{
get
{
return this.fieldKeyType;
}
set
{
this.fieldKeyType = value;
}
}
[XmlElement]
public int Length
{
get
{
return this.length;
}
set
{
this.length = value;
}
}
[XmlElement]
public long ID
{
get
{
return this.id;
}
set
{
this.id = value;
}
}
public int Order
{
get
{
return this.order;
}
set
{
this.order = value;
}
}
public AbstractField(AbstractTable absTable, string name, string aliasName, DBDataType dbType, IKgisDictionary dictionary, FieldKeyType fieldKeyType, string defaultValue, int length, string description)
{
this.absTable = absTable;
this.name = name;
this.aliasName = aliasName;
this.dbType = dbType;
this.dictionary = dictionary;
this.fieldKeyType = fieldKeyType;
this.defaultValue = defaultValue;
this.length = length;
this.description = description;
}
public override string ToString()
{
if (this.aliasName == null || this.aliasName.Equals(""))
{
return this.name;
}
return this.aliasName;
}
}
}