Skip to content
DictType.cs 4.24 KiB
Newer Older
Jack Dan's avatar
Jack Dan committed
//------------------------------------------------------------------------------
// <auto-generated>
//     此代码由工具生成。
//     运行时版本:2.0.50727.8935
//     Support: http://www.cnblogs.com/huxj
//     对此文件的更改可能会导致不正确的行为,并且如果
//     重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------


using System;
using System.Data;
using System.Data.Common;
using Hxj.Data;
using Hxj.Data.Common;

namespace Ces.Model
{

	/// <summary>
	/// 实体类DictType 。(属性说明自动提取数据库字段的描述信息)
	/// </summary>
	[Serializable]
	public class DictType : Entity 
	{
		public DictType():base("DictType") {}

		#region Model
		private Guid _TypeID;
		private Guid _ParentID;
		private string _TypeName;
		private string _Descript;
		private bool _IsDel;
		/// <summary>
		/// 
		/// </summary>
		public Guid TypeID
		{
			get{ return _TypeID; }
			set
			{
				this.OnPropertyValueChange(_.TypeID,_TypeID,value);
				this._TypeID=value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public Guid ParentID
		{
			get{ return _ParentID; }
			set
			{
				this.OnPropertyValueChange(_.ParentID,_ParentID,value);
				this._ParentID=value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string TypeName
		{
			get{ return _TypeName; }
			set
			{
				this.OnPropertyValueChange(_.TypeName,_TypeName,value);
				this._TypeName=value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Descript
		{
			get{ return _Descript; }
			set
			{
				this.OnPropertyValueChange(_.Descript,_Descript,value);
				this._Descript=value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool IsDel
		{
			get{ return _IsDel; }
			set
			{
				this.OnPropertyValueChange(_.IsDel,_IsDel,value);
				this._IsDel=value;
			}
		}
		#endregion

		#region Method
		/// <summary>
		/// 获取实体中的主键列
		/// </summary>
		public override Field[] GetPrimaryKeyFields()
		{
			return new Field[] {
				_.TypeID};
		}
		/// <summary>
		/// 获取列信息
		/// </summary>
		public override Field[] GetFields()
		{
			return new Field[] {
				_.TypeID,
				_.ParentID,
				_.TypeName,
				_.Descript,
				_.IsDel};
		}
		/// <summary>
		/// 获取值信息
		/// </summary>
		public override object[] GetValues()
		{
			return new object[] {
				this._TypeID,
				this._ParentID,
				this._TypeName,
				this._Descript,
				this._IsDel};
		}
		/// <summary>
		/// 给当前实体赋值
		/// </summary>
		public override void SetPropertyValues(IDataReader reader)
		{
			this._TypeID = DataUtils.ConvertValue<Guid>(reader["TypeID"]);
			this._ParentID = DataUtils.ConvertValue<Guid>(reader["ParentID"]);
			this._TypeName = DataUtils.ConvertValue<string>(reader["TypeName"]);
			this._Descript = DataUtils.ConvertValue<string>(reader["Descript"]);
			this._IsDel = DataUtils.ConvertValue<bool>(reader["IsDel"]);
		}
		/// <summary>
		/// 给当前实体赋值
		/// </summary>
		public override void SetPropertyValues(DataRow row)
		{
			this._TypeID = DataUtils.ConvertValue<Guid>(row["TypeID"]);
			this._ParentID = DataUtils.ConvertValue<Guid>(row["ParentID"]);
			this._TypeName = DataUtils.ConvertValue<string>(row["TypeName"]);
			this._Descript = DataUtils.ConvertValue<string>(row["Descript"]);
			this._IsDel = DataUtils.ConvertValue<bool>(row["IsDel"]);
		}
		#endregion

		#region _Field
		/// <summary>
		/// 字段信息
		/// </summary>
		public class _
		{
			/// <summary>
			/// * 
			/// </summary>
			public readonly static Field All = new Field("*","DictType");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field TypeID = new Field("TypeID","DictType","TypeID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ParentID = new Field("ParentID","DictType","ParentID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field TypeName = new Field("TypeName","DictType","TypeName");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Descript = new Field("Descript","DictType","Descript");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IsDel = new Field("IsDel","DictType","IsDel");
		}
		#endregion


	}
}