PageRenderTime 52ms CodeModel.GetById 28ms 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
  1. using System;
  2. using System.Data.Linq;
  3. using System.Data.Linq.Mapping;
  4. using System.Data;
  5. using System.Collections.Generic;
  6. using System.Reflection;
  7. using System.Linq;
  8. using System.Linq.Expressions;
  9. using System.ComponentModel;
  10. namespace CmsData
  11. {
  12. [Table(Name="lookup.BundleHeaderTypes")]
  13. public partial class BundleHeaderType : INotifyPropertyChanging, INotifyPropertyChanged
  14. {
  15. private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
  16. #region Private Fields
  17. private int _Id;
  18. private string _Code;
  19. private string _Description;
  20. private bool? _Hardwired;
  21. private EntitySet< BundleHeader> _BundleHeaders;
  22. #endregion
  23. #region Extensibility Method Definitions
  24. partial void OnLoaded();
  25. partial void OnValidate(System.Data.Linq.ChangeAction action);
  26. partial void OnCreated();
  27. partial void OnIdChanging(int value);
  28. partial void OnIdChanged();
  29. partial void OnCodeChanging(string value);
  30. partial void OnCodeChanged();
  31. partial void OnDescriptionChanging(string value);
  32. partial void OnDescriptionChanged();
  33. partial void OnHardwiredChanging(bool? value);
  34. partial void OnHardwiredChanged();
  35. #endregion
  36. public BundleHeaderType()
  37. {
  38. this._BundleHeaders = new EntitySet< BundleHeader>(new Action< BundleHeader>(this.attach_BundleHeaders), new Action< BundleHeader>(this.detach_BundleHeaders));
  39. OnCreated();
  40. }
  41. #region Columns
  42. [Column(Name="Id", UpdateCheck=UpdateCheck.Never, Storage="_Id", DbType="int NOT NULL", IsPrimaryKey=true)]
  43. public int Id
  44. {
  45. get { return this._Id; }
  46. set
  47. {
  48. if (this._Id != value)
  49. {
  50. this.OnIdChanging(value);
  51. this.SendPropertyChanging();
  52. this._Id = value;
  53. this.SendPropertyChanged("Id");
  54. this.OnIdChanged();
  55. }
  56. }
  57. }
  58. [Column(Name="Code", UpdateCheck=UpdateCheck.Never, Storage="_Code", DbType="nvarchar(10)")]
  59. public string Code
  60. {
  61. get { return this._Code; }
  62. set
  63. {
  64. if (this._Code != value)
  65. {
  66. this.OnCodeChanging(value);
  67. this.SendPropertyChanging();
  68. this._Code = value;
  69. this.SendPropertyChanged("Code");
  70. this.OnCodeChanged();
  71. }
  72. }
  73. }
  74. [Column(Name="Description", UpdateCheck=UpdateCheck.Never, Storage="_Description", DbType="nvarchar(50)")]
  75. public string Description
  76. {
  77. get { return this._Description; }
  78. set
  79. {
  80. if (this._Description != value)
  81. {
  82. this.OnDescriptionChanging(value);
  83. this.SendPropertyChanging();
  84. this._Description = value;
  85. this.SendPropertyChanged("Description");
  86. this.OnDescriptionChanged();
  87. }
  88. }
  89. }
  90. [Column(Name="Hardwired", UpdateCheck=UpdateCheck.Never, Storage="_Hardwired", DbType="bit")]
  91. public bool? Hardwired
  92. {
  93. get { return this._Hardwired; }
  94. set
  95. {
  96. if (this._Hardwired != value)
  97. {
  98. this.OnHardwiredChanging(value);
  99. this.SendPropertyChanging();
  100. this._Hardwired = value;
  101. this.SendPropertyChanged("Hardwired");
  102. this.OnHardwiredChanged();
  103. }
  104. }
  105. }
  106. #endregion
  107. #region Foreign Key Tables
  108. [Association(Name="FK_BUNDLE_HEADER_TBL_BundleHeaderTypes", Storage="_BundleHeaders", OtherKey="BundleHeaderTypeId")]
  109. public EntitySet< BundleHeader> BundleHeaders
  110. {
  111. get { return this._BundleHeaders; }
  112. set { this._BundleHeaders.Assign(value); }
  113. }
  114. #endregion
  115. #region Foreign Keys
  116. #endregion
  117. public event PropertyChangingEventHandler PropertyChanging;
  118. protected virtual void SendPropertyChanging()
  119. {
  120. if ((this.PropertyChanging != null))
  121. this.PropertyChanging(this, emptyChangingEventArgs);
  122. }
  123. public event PropertyChangedEventHandler PropertyChanged;
  124. protected virtual void SendPropertyChanged(String propertyName)
  125. {
  126. if ((this.PropertyChanged != null))
  127. this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
  128. }
  129. private void attach_BundleHeaders(BundleHeader entity)
  130. {
  131. this.SendPropertyChanging();
  132. entity.BundleHeaderType = this;
  133. }
  134. private void detach_BundleHeaders(BundleHeader entity)
  135. {
  136. this.SendPropertyChanging();
  137. entity.BundleHeaderType = null;
  138. }
  139. }
  140. }