Click here to Skip to main content
15,881,027 members
Articles / Web Development / ASP.NET

Developing Next Generation Smart Clients using .NET 2.0 working with Existing .NET 1.1 SOA-based XML Web Services

Rate me:
Please Sign up or sign in to vote.
4.96/5 (134 votes)
16 Aug 200540 min read 1.2M   3.9K   462  
Comprehensive guide to development of .NET 2.0 Smart Clients working with existing Service Oriented Architecture based XML web services, fully utilizing the Enterprise Library
// =====================================================================================
// Copyright © 2005 by . All rights are reserved.
// 
// If you like this code then feel free to go ahead and use it.
// The only thing I ask is that you don't remove or alter my copyright notice.
//
// Your use of this software is entirely at your own risk. I make no claims or
// warrantees about the reliability or fitness of this code for any particular purpose.
// If you make changes or additions to this code please mark your code as being yours.
// 
// website , email OmarALZabir@gmail.com, msn oazabir@hotmail.com
// =====================================================================================


	
/*
	Code Generated by a tool.
	Wednesday, July 27, 2005
	Do not modify, edit the file SectionRoutine.cs instead.
*/
using System;
using System.ComponentModel;
using System.Collections;
using System.Xml.Serialization;

namespace SmartInstitute
{
	#region SectionRoutineEventArgs class
	///<summary>
	/// Provides data for the BeforeChanged and AfterChanged events.
	///</summary>
	///<remarks>The BeforeChanged and AfterChanged events occur when a change is made to the value of a property of a <see cref="SectionRoutine"/> object.</remarks>
	public class SectionRoutineEventArgs : System.EventArgs
	{
		private SectionRoutineColumns column;
		
		
		///<summary>
		/// Initalizes a new Instance of the SectionRoutineEventArgs class.
		///</summary>
		public SectionRoutineEventArgs(SectionRoutineColumns column)
		{
			this.column = column;
		}
		
		
		///<summary>
		/// The SectionRoutineColumns that was modified, which has raised the event.
		///</summary>
		///<value cref="SectionRoutineColumns" />
		public SectionRoutineColumns Column
		{
			get {return this.column;}
		}
	}
	#endregion
	
	
	///<summary>
	/// Define a delegate for all SectionRoutine related events.
	///</summary>
	public delegate void SectionRoutineEventHandler(object sender, SectionRoutineEventArgs e);
		
	
	///<summary>
	/// An object representation of the 'SectionRoutine' table.
	///</summary>
	/// <remarks>
	/// This class is generated by a tool and should never be modified.
    /// All custom implementations should be done in the <see cref="SectionRoutine"/> class.
    /// </remarks>
	[Serializable]
	public class SectionRoutineBase : System.IComparable, System.ICloneable, IEntity
	{
		
		#region "Variable Declarations"
		
		/// <summary>
		/// ID : 
		/// </summary>
		protected System.Int32		  _ID = (int)0;
		
		/// <summary>
		/// SectionID : 
		/// </summary>
		protected System.Int32		  _SectionID = (int)0;
		
		/// <summary>
		/// StartTime : 
		/// </summary>
		protected System.Int32		  _StartTime = (int)0;
		
		/// <summary>
		/// EndTime : 
		/// </summary>
		protected System.Int32		  _EndTime = (int)0;
		
		/// <summary>
		/// ClassType : 
		/// </summary>
		protected System.Int32		  _ClassType = (int)0;
		
		/// <summary>
		/// ChangeStamp : 
		/// </summary>
		protected System.DateTime		  _ChangeStamp = DateTime.MinValue;
		
		
		/// <summary>
		/// Occurs before the object is changed.
		/// </summary>	
		public event SectionRoutineEventHandler BeforeChanged;
		
		
		/// <summary>
		/// Occurs after the object is changed.
		/// </summary>
		public event SectionRoutineEventHandler AfterChanged;		
		#endregion "Variable Declarations"
		
		
		#region "Constructors"
		///<summary>
		/// Creates a new <see cref="SectionRoutineBase"/> instance.
		///</summary>
		public SectionRoutineBase()
		{
		}		
		
		///<summary>
		/// Creates a new <see cref="SectionRoutineBase"/> instance.
		///</summary>
		///<param name="ID"></param>
		///<param name="SectionID"></param>
		///<param name="StartTime"></param>
		///<param name="EndTime"></param>
		///<param name="ClassType"></param>
		///<param name="ChangeStamp"></param>
		public SectionRoutineBase(System.Int32 ID, System.Int32 SectionID, System.Int32 StartTime, System.Int32 EndTime, System.Int32 ClassType, System.DateTime ChangeStamp)
		{
			_ID = ID;
			_SectionID = SectionID;
			_StartTime = StartTime;
			_EndTime = EndTime;
			_ClassType = ClassType;
			_ChangeStamp = ChangeStamp;
		}
				
		#endregion "Constructors"
		
		
		#region Events trigger
		/// <summary>
		/// Raises the <see cref="BeforeChanged" /> event.
		/// </summary>
		/// <param name="column">The <see cref="SectionRoutineColumns"/> which has fired the event.</param>
		public void OnBeforeChanged(SectionRoutineColumns column)
		{
			if(BeforeChanged != null)
			{
				BeforeChanged(this, new SectionRoutineEventArgs(column));
			}
	
		}
		
		
		/// <summary>
		/// Raises the <see cref="AfterChanged" /> event.
		/// </summary>
		/// <param name="column">The <see cref="SectionRoutineColumns"/> which has fired the event.</param>
		public void OnAfterChanged(SectionRoutineColumns column)
		{
			if(AfterChanged != null)
			{
				AfterChanged(this, new SectionRoutineEventArgs(column));
			}
	
		} 
		#endregion
		
		
		#region Properties	
		/// <summary>
		/// 	Gets or Sets the ID property. 
		///		
		/// </summary>
		/// <value>This type is int</value>
		[DescriptionAttribute("")]
		public System.Int32 ID
		{
			get { return _ID; }
			set
			{
				if (_ID == value)
					return;
					
				OnBeforeChanged(SectionRoutineColumns.ID);
				_ID = value;
				_isdirty = true;
				OnAfterChanged(SectionRoutineColumns.ID);
			}
		}
	
		/// <summary>
		/// 	Gets or Sets the SectionID property. 
		///		
		/// </summary>
		/// <value>This type is int</value>
		[DescriptionAttribute("")]
		public System.Int32 SectionID
		{
			get { return _SectionID; }
			set
			{
				if (_SectionID == value)
					return;
					
				OnBeforeChanged(SectionRoutineColumns.SectionID);
				_SectionID = value;
				_isdirty = true;
				OnAfterChanged(SectionRoutineColumns.SectionID);
			}
		}
	
		/// <summary>
		/// 	Gets or Sets the StartTime property. 
		///		
		/// </summary>
		/// <value>This type is int</value>
		[DescriptionAttribute("")]
		public System.Int32 StartTime
		{
			get { return _StartTime; }
			set
			{
				if (_StartTime == value)
					return;
					
				OnBeforeChanged(SectionRoutineColumns.StartTime);
				_StartTime = value;
				_isdirty = true;
				OnAfterChanged(SectionRoutineColumns.StartTime);
			}
		}
	
		/// <summary>
		/// 	Gets or Sets the EndTime property. 
		///		
		/// </summary>
		/// <value>This type is int</value>
		[DescriptionAttribute("")]
		public System.Int32 EndTime
		{
			get { return _EndTime; }
			set
			{
				if (_EndTime == value)
					return;
					
				OnBeforeChanged(SectionRoutineColumns.EndTime);
				_EndTime = value;
				_isdirty = true;
				OnAfterChanged(SectionRoutineColumns.EndTime);
			}
		}
	
		/// <summary>
		/// 	Gets or Sets the ClassType property. 
		///		
		/// </summary>
		/// <value>This type is int</value>
		[DescriptionAttribute("")]
		public System.Int32 ClassType
		{
			get { return _ClassType; }
			set
			{
				if (_ClassType == value)
					return;
					
				OnBeforeChanged(SectionRoutineColumns.ClassType);
				_ClassType = value;
				_isdirty = true;
				OnAfterChanged(SectionRoutineColumns.ClassType);
			}
		}
	
		/// <summary>
		/// 	Gets or Sets the ChangeStamp property. 
		///		
		/// </summary>
		/// <value>This type is smalldatetime</value>
		[DescriptionAttribute("")]
		public System.DateTime ChangeStamp
		{
			get { return _ChangeStamp; }
			set
			{
				if (_ChangeStamp == value)
					return;
					
				OnBeforeChanged(SectionRoutineColumns.ChangeStamp);
				_ChangeStamp = value;
				_isdirty = true;
				OnAfterChanged(SectionRoutineColumns.ChangeStamp);
			}
		}
	
	

		private bool _isdeleted = false;
		/// <summary>
		/// 	True if object has been <see cref="MarkToDelete"/>. ReadOnly.
		/// </summary>
		[BrowsableAttribute(false)]
		public bool IsDeleted
		{
			get { return _isdeleted; }
			set { _isdeleted = value; }
		}


		private bool _isdirty = false;
		/// <summary>
		///		Indicates if the object has been modified from its original state.
		/// </summary>
		///<value>True if object has been modified from its original state; otherwise False;</value>
		[BrowsableAttribute(false)]
		public bool IsDirty
		{
			get { return _isdirty; }
			set { _isdirty = value; }
		}
		

		private bool _isnew = false;
		/// <summary>
		///		Indicates if the object is new.
		/// </summary>
		///<value>True if objectis new; otherwise False;</value>
		[BrowsableAttribute(false)]
		public bool IsNew
		{
			get { return _isnew; }
			set { _isnew = value; }
		}

		/// <summary>
		///		The name of the underlying database table.
		/// </summary>
		[BrowsableAttribute(false)]
		public string TableName
		{
			get { return "SectionRoutine"; }
		}
		
		#endregion
		
		#region Methods	
		
		/// <summary>
		/// Accepts the changes made to this object by setting each flags to false.
		/// </summary>
		public void AcceptChanges()
		{
			_isdeleted = false;
			_isdirty = false;
			_isnew = false;
		}
		
		
		///<summary>
		///  TODO: Revert all changes and restore original values.
		///  Currently not supported.
		///</summary>
		public virtual void CancelChanges(){
			throw new NotSupportedException("Method currently not Supported.");
		}
		
		///<summary>
		///   Marks entity to be deleted.
		///</summary>
		public void MarkToDelete()
		{
			_isdeleted = true;
		}
		
		#region ICloneable Members
		///<summary>
		///  Returns a Typed SectionRoutineBase Entity 
		///</summary>
		public virtual SectionRoutineBase Copy()
		{
			//shallow copy entity
			SectionRoutine copy = new SectionRoutine();
			copy.ID = this._ID;
			copy.SectionID = this._SectionID;
			copy.StartTime = this._StartTime;
			copy.EndTime = this._EndTime;
			copy.ClassType = this._ClassType;
			copy.ChangeStamp = this._ChangeStamp;
					
			copy.AcceptChanges();
			return (SectionRoutine)copy;
		}
		
		///<summary>
		/// ICloneable.Clone() Member, returns the Deep Copy of this entity.
		///</summary>
		public object Clone(){
			return this.Copy();
		}
		
		///<summary>
		/// Returns a deep copy of the child collection object passed in.
		///</summary>
		public static object MakeCopyOf(object x)
		{
			if (x is ICloneable)
			{
				// Return a deep copy of the object
				return ((ICloneable)x).Clone();
			}
			else
				throw new System.NotSupportedException("Object Does Not Implement the ICloneable Interface.");
		}
		#endregion
		
		
		///<summary>
		/// Returns a value indicating whether this instance is equal to a specified object.
		///</summary>
		///<param name="toObject">An object to compare to this instance.</param>
		///<returns>true if toObject is a <see cref="SectionRoutineBase"/> and has the same value as this instance; otherwise, false.</returns>
		public bool Equals(SectionRoutineBase toObject)
		{
			return Equals(this, toObject);
		}
		
		
		///<summary>
		/// Determines whether the specified <see cref="SectionRoutineBase"/> instances are considered equal.
		///</summary>
		///<param name="Object1">The first <see cref="SectionRoutineBase"/> to compare.</param>
		///<param name="Object2">The second <see cref="SectionRoutineBase"/> to compare. </param>
		///<returns>true if Object1 is the same instance as Object2 or if both are null references or if objA.Equals(objB) returns true; otherwise, false.</returns>
		public static bool Equals(SectionRoutineBase Object1, SectionRoutineBase Object2)
		{
			bool equal = true;
			if (Object1.ID != Object2.ID)
				equal = false;
			if (Object1.SectionID != Object2.SectionID)
				equal = false;
			if (Object1.StartTime != Object2.StartTime)
				equal = false;
			if (Object1.EndTime != Object2.EndTime)
				equal = false;
			if (Object1.ClassType != Object2.ClassType)
				equal = false;
			if (Object1.ChangeStamp != Object2.ChangeStamp)
				equal = false;
			return equal;
		}
		
		#endregion
		
		#region IComparable Members
		///<summary>
		/// Compares this instance to a specified object and returns an indication of their relative values.
		///<param name="obj">An object to compare to this instance, or a null reference (Nothing in Visual Basic).</param>
		///</summary>
		///<returns>A signed integer that indicates the relative order of this instance and obj.</returns>
		public int CompareTo(object obj)
		{
			return this.ID.CompareTo(((SectionRoutineBase)obj).ID);
		}
	
		#endregion
		
			
		#region "IsColumnNull"
		#endregion "IsColumnNull"
		
		///<summary>
		/// Returns a String that represents the current object.
		///</summary>
		public override string ToString()
		{
			return string.Format("{7}{6}- ID: {0}{6}- SectionID: {1}{6}- StartTime: {2}{6}- EndTime: {3}{6}- ClassType: {4}{6}- ChangeStamp: {5}{6}", ID, SectionID, StartTime, EndTime, ClassType, ChangeStamp, Environment.NewLine, this.GetType());
		}
	
	}//End Class
	
	
	/// <summary>
	/// Enumerate the SectionRoutine columns.
	/// </summary>
	public enum SectionRoutineColumns
	{
		/// <summary>
		/// ID : 
		/// </summary>
		ID,
		/// <summary>
		/// SectionID : 
		/// </summary>
		SectionID,
		/// <summary>
		/// StartTime : 
		/// </summary>
		StartTime,
		/// <summary>
		/// EndTime : 
		/// </summary>
		EndTime,
		/// <summary>
		/// ClassType : 
		/// </summary>
		ClassType,
		/// <summary>
		/// ChangeStamp : 
		/// </summary>
		ChangeStamp
	}//End enum

} // end namespace

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Architect BT, UK (ex British Telecom)
United Kingdom United Kingdom

Comments and Discussions