PageRenderTime 20ms CodeModel.GetById 10ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/CmsData/Generated/BundleHeaderType.cs

https://github.com/vs06/bvcms
C# | 203 lines | 140 code | 63 blank | 0 comment | 12 complexity | 500f08b24dafe3dc300c32b80065a0d2 MD5 | raw file
  1using System; 
  2using System.Data.Linq;
  3using System.Data.Linq.Mapping;
  4using System.Data;
  5using System.Collections.Generic;
  6using System.Reflection;
  7using System.Linq;
  8using System.Linq.Expressions;
  9using System.ComponentModel;
 10
 11namespace CmsData
 12{
 13	[Table(Name="lookup.BundleHeaderTypes")]
 14	public partial class BundleHeaderType : INotifyPropertyChanging, INotifyPropertyChanged
 15	{
 16		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
 17		
 18	#region Private Fields
 19		
 20		private int _Id;
 21		
 22		private string _Code;
 23		
 24		private string _Description;
 25		
 26		private bool? _Hardwired;
 27		
 28   		
 29   		private EntitySet< BundleHeader> _BundleHeaders;
 30		
 31    	
 32	#endregion
 33	
 34    #region Extensibility Method Definitions
 35    partial void OnLoaded();
 36    partial void OnValidate(System.Data.Linq.ChangeAction action);
 37    partial void OnCreated();
 38		
 39		partial void OnIdChanging(int value);
 40		partial void OnIdChanged();
 41		
 42		partial void OnCodeChanging(string value);
 43		partial void OnCodeChanged();
 44		
 45		partial void OnDescriptionChanging(string value);
 46		partial void OnDescriptionChanged();
 47		
 48		partial void OnHardwiredChanging(bool? value);
 49		partial void OnHardwiredChanged();
 50		
 51    #endregion
 52		public BundleHeaderType()
 53		{
 54			
 55			this._BundleHeaders = new EntitySet< BundleHeader>(new Action< BundleHeader>(this.attach_BundleHeaders), new Action< BundleHeader>(this.detach_BundleHeaders)); 
 56			
 57			
 58			OnCreated();
 59		}
 60
 61		
 62    #region Columns
 63		
 64		[Column(Name="Id", UpdateCheck=UpdateCheck.Never, Storage="_Id", DbType="int NOT NULL", IsPrimaryKey=true)]
 65		public int Id
 66		{
 67			get { return this._Id; }
 68
 69			set
 70			{
 71				if (this._Id != value)
 72				{
 73				
 74                    this.OnIdChanging(value);
 75					this.SendPropertyChanging();
 76					this._Id = value;
 77					this.SendPropertyChanged("Id");
 78					this.OnIdChanged();
 79				}
 80
 81			}
 82
 83		}
 84
 85		
 86		[Column(Name="Code", UpdateCheck=UpdateCheck.Never, Storage="_Code", DbType="nvarchar(10)")]
 87		public string Code
 88		{
 89			get { return this._Code; }
 90
 91			set
 92			{
 93				if (this._Code != value)
 94				{
 95				
 96                    this.OnCodeChanging(value);
 97					this.SendPropertyChanging();
 98					this._Code = value;
 99					this.SendPropertyChanged("Code");
100					this.OnCodeChanged();
101				}
102
103			}
104
105		}
106
107		
108		[Column(Name="Description", UpdateCheck=UpdateCheck.Never, Storage="_Description", DbType="nvarchar(50)")]
109		public string Description
110		{
111			get { return this._Description; }
112
113			set
114			{
115				if (this._Description != value)
116				{
117				
118                    this.OnDescriptionChanging(value);
119					this.SendPropertyChanging();
120					this._Description = value;
121					this.SendPropertyChanged("Description");
122					this.OnDescriptionChanged();
123				}
124
125			}
126
127		}
128
129		
130		[Column(Name="Hardwired", UpdateCheck=UpdateCheck.Never, Storage="_Hardwired", DbType="bit")]
131		public bool? Hardwired
132		{
133			get { return this._Hardwired; }
134
135			set
136			{
137				if (this._Hardwired != value)
138				{
139				
140                    this.OnHardwiredChanging(value);
141					this.SendPropertyChanging();
142					this._Hardwired = value;
143					this.SendPropertyChanged("Hardwired");
144					this.OnHardwiredChanged();
145				}
146
147			}
148
149		}
150
151		
152    #endregion
153        
154    #region Foreign Key Tables
155   		
156   		[Association(Name="FK_BUNDLE_HEADER_TBL_BundleHeaderTypes", Storage="_BundleHeaders", OtherKey="BundleHeaderTypeId")]
157   		public EntitySet< BundleHeader> BundleHeaders
158   		{
159   		    get { return this._BundleHeaders; }
160
161			set	{ this._BundleHeaders.Assign(value); }
162
163   		}
164
165		
166	#endregion
167	
168	#region Foreign Keys
169    	
170	#endregion
171	
172		public event PropertyChangingEventHandler PropertyChanging;
173		protected virtual void SendPropertyChanging()
174		{
175			if ((this.PropertyChanging != null))
176				this.PropertyChanging(this, emptyChangingEventArgs);
177		}
178
179		public event PropertyChangedEventHandler PropertyChanged;
180		protected virtual void SendPropertyChanged(String propertyName)
181		{
182			if ((this.PropertyChanged != null))
183				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
184		}
185
186   		
187		private void attach_BundleHeaders(BundleHeader entity)
188		{
189			this.SendPropertyChanging();
190			entity.BundleHeaderType = this;
191		}
192
193		private void detach_BundleHeaders(BundleHeader entity)
194		{
195			this.SendPropertyChanging();
196			entity.BundleHeaderType = null;
197		}
198
199		
200	}
201
202}
203