Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

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

, 16 Aug 2005
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
smartclientsoa_src.zip
SmartClient
Client
SMI.App
Controls
Forms
Modules
Properties
app.manifest
Settings.settings
Resources
240.png
Bottom.png
BuilderDialog_delete.bmp
DarkBlue.bmp
download-xp.gif
Earth.png
fldropen.png
iSync.gif
Leonardo_da_Vinci_My_Computer.png
LightBlue.bmp
LoginBox.jpg
LoginButton.jpg
LoginButton1.jpg
LoginButton2.jpg
Logo1.png
LogoPic.jpg
Middle.png
Refresh.bmp
refresh.ico
refresh1.ico
RightArrow.bmp
SuccessComplete.bmp
Task.bmp
Tasks.png
Top.png
TurnOffButton.bmp
wi0062-32.ico
wi0063-32.ico
wi0064-16.ico
wi0064-32.ico
SmartInstitute.App.csproj.user
wi0064-32.ico
SMI.Automation
Commands
Course
Framework
Security
Students
UI
Controls
Documents
MiscDocuments
StudentDocuments
Factories
Forms
Helpers
Misc
Properties
Settings.settings
Resources
BuilderDialog_delete.bmp
LogoSmall.bmp
Misho.jpg
My Pic 7.jpg
table.ico
SmartInstitute.Automation.csproj.user
Web References
SmartInstituteServices.AccountService
Account.datasource
AccountService.disco
AccountService.wsdl
Reference.map
SmartInstituteServices.CourseService
Course.datasource
CourseService.disco
CourseService.wsdl
Reference.map
SmartInstituteServices.SecurityService
Reference.map
SecurityService.disco
SecurityService.wsdl
SmartInstituteServices.StudentService
Reference.map
Student.datasource
StudentService.disco
StudentService.wsdl
SMI.ObjectModel.Enhanced
Base
Models
Properties
Settings.settings
Settings
SmartInstitute.ObjectModel.csproj.user
UMS.ObjectModel.Enhanced.csproj.user
SMI.Objects
SmartInstitute.csproj.user
CodeSmith
Tier
BusinessLogicLayer
Entity.cst
EntityBase.cst
EntityCollection.cst
EntityCollectionBase.cst
Enum.cst
IEntity.cst
DataAccessLayer
App.config.cst
CommonSql.cst
Configuration.cst
DBConcurrencyException.cst
DBException.cst
Factories
EntityRepositoryFactory.cst
IEntityRepository.cst
SqlClient
CVS
Entries
Entries.Extra
Entries.Extra.Old
Entries.Old
Repository
Root
TortoiseCVS.Status
SqlEntityRepository.cst
SqlEntityRepositoryBase.cst
TransactionManager.cst
UnitTests
EntityRepositoryTest.cst
WebServiceClient
WsEntityRepository.cst
WsEntityRepositoryBase.cst
Main.cst
nant.cst
References
GotDotNet.ApplicationBlocks.Data.dll
Microsoft.ApplicationBlocks.Data.dll
nunit.framework.dll
StoredProcedures.cst
vsnet2003.project.cst
vsnet2003.solution.cst
vsnet2005.project.cst
vsnet2005.solution.cst
WebService
Web.config.cst
WebService.cst
Database
SmartInstitute.bak
Library
Microsoft.Practices.EnterpriseLibrary.Caching.dll
Microsoft.Practices.EnterpriseLibrary.Common.dll
Microsoft.Practices.EnterpriseLibrary.Configuration.dll
Microsoft.Practices.EnterpriseLibrary.Data.dll
Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.dll
Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.dll
Microsoft.Practices.EnterpriseLibrary.Logging.dll
Microsoft.Practices.EnterpriseLibrary.Security.ActiveDirectory.dll
Microsoft.Practices.EnterpriseLibrary.Security.Cache.CachingStore.dll
Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.dll
Microsoft.Practices.EnterpriseLibrary.Security.Database.Authentication.dll
Microsoft.Practices.EnterpriseLibrary.Security.Database.dll
Microsoft.Practices.EnterpriseLibrary.Security.dll
nunit.core.dll
nunit.framework.dll
Server
BLL
SmartInstitute.csproj.user
DAL
Factories
SmartInstitute.DataAccessLayer.csproj.user
SqlClient
Utilities
GotDotNet.ApplicationBlocks.Data.dll
Microsoft.ApplicationBlocks.Data.dll
nunit.framework.dll
UnitTests
SmartInstitute.build
SmartInstitute.Facade
FacadeTest
SmartInstitute.Facade.csproj.user
SmartInstitute.Test
App.ico
SmartInstitute.Test.csproj.user
SmartInstituteServices
Global.asax
log
SmartInstituteServices.csproj.webinfo
SQL
Setup
SecurityDatabase
SecurityDatabaseConsole
App.ico
SecurityDatabaseConsole.exe.manifest
SR.strings
Tests
Tools.SecurityDatabaseConsole.csproj.user
// =====================================================================================
// 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 CourseSection.cs instead.
*/
using System;
using System.ComponentModel;
using System.Collections;
using System.Xml.Serialization;

namespace SmartInstitute
{
	#region CourseSectionEventArgs 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="CourseSection"/> object.</remarks>
	public class CourseSectionEventArgs : System.EventArgs
	{
		private CourseSectionColumns column;
		
		
		///<summary>
		/// Initalizes a new Instance of the CourseSectionEventArgs class.
		///</summary>
		public CourseSectionEventArgs(CourseSectionColumns column)
		{
			this.column = column;
		}
		
		
		///<summary>
		/// The CourseSectionColumns that was modified, which has raised the event.
		///</summary>
		///<value cref="CourseSectionColumns" />
		public CourseSectionColumns Column
		{
			get {return this.column;}
		}
	}
	#endregion
	
	
	///<summary>
	/// Define a delegate for all CourseSection related events.
	///</summary>
	public delegate void CourseSectionEventHandler(object sender, CourseSectionEventArgs e);
		
	
	///<summary>
	/// An object representation of the 'CourseSection' 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="CourseSection"/> class.
    /// </remarks>
	[Serializable]
	public class CourseSectionBase : System.IComparable, System.ICloneable, IEntity
	{
		
		#region "Variable Declarations"
		
		/// <summary>
		/// ID : 
		/// </summary>
		protected System.Int32		  _ID = (int)0;
		
		/// <summary>
		/// Title : 
		/// </summary>
		protected System.String		  _Title = string.Empty;
		
		/// <summary>
		/// Description : 
		/// </summary>
		protected System.String		  _Description = string.Empty;
		
		/// <summary>
		/// Capacity : 
		/// </summary>
		protected System.Int32		  _Capacity = (int)0;
		
		/// <summary>
		/// CourseID : 
		/// </summary>
		protected System.Int32		  _CourseID = (int)0;
		
		/// <summary>
		/// ClassID : 
		/// </summary>
		protected System.String		  _ClassID = string.Empty;
		
		/// <summary>
		/// Status : 
		/// </summary>
		protected System.Int32		  _Status = (int)0;
		
		/// <summary>
		/// Type : 
		/// </summary>
		protected System.Int32		  _Type = (int)0;
		
		/// <summary>
		/// ChangeStamp : 
		/// </summary>
		protected System.DateTime		  _ChangeStamp = DateTime.MinValue;
		
		
		/// <summary>
		/// Occurs before the object is changed.
		/// </summary>	
		public event CourseSectionEventHandler BeforeChanged;
		
		
		/// <summary>
		/// Occurs after the object is changed.
		/// </summary>
		public event CourseSectionEventHandler AfterChanged;		
		#endregion "Variable Declarations"
		
		
		#region "Constructors"
		///<summary>
		/// Creates a new <see cref="CourseSectionBase"/> instance.
		///</summary>
		public CourseSectionBase()
		{
		}		
		
		///<summary>
		/// Creates a new <see cref="CourseSectionBase"/> instance.
		///</summary>
		///<param name="ID"></param>
		///<param name="Title"></param>
		///<param name="Description"></param>
		///<param name="Capacity"></param>
		///<param name="CourseID"></param>
		///<param name="ClassID"></param>
		///<param name="Status"></param>
		///<param name="Type"></param>
		///<param name="ChangeStamp"></param>
		public CourseSectionBase(System.Int32 ID, System.String Title, System.String Description, System.Int32 Capacity, System.Int32 CourseID, System.String ClassID, System.Int32 Status, System.Int32 Type, System.DateTime ChangeStamp)
		{
			_ID = ID;
			_Title = Title;
			_Description = Description;
			_Capacity = Capacity;
			_CourseID = CourseID;
			_ClassID = ClassID;
			_Status = Status;
			_Type = Type;
			_ChangeStamp = ChangeStamp;
		}
				
		#endregion "Constructors"
		
		
		#region Events trigger
		/// <summary>
		/// Raises the <see cref="BeforeChanged" /> event.
		/// </summary>
		/// <param name="column">The <see cref="CourseSectionColumns"/> which has fired the event.</param>
		public void OnBeforeChanged(CourseSectionColumns column)
		{
			if(BeforeChanged != null)
			{
				BeforeChanged(this, new CourseSectionEventArgs(column));
			}
	
		}
		
		
		/// <summary>
		/// Raises the <see cref="AfterChanged" /> event.
		/// </summary>
		/// <param name="column">The <see cref="CourseSectionColumns"/> which has fired the event.</param>
		public void OnAfterChanged(CourseSectionColumns column)
		{
			if(AfterChanged != null)
			{
				AfterChanged(this, new CourseSectionEventArgs(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(CourseSectionColumns.ID);
				_ID = value;
				_isdirty = true;
				OnAfterChanged(CourseSectionColumns.ID);
			}
		}
	
		/// <summary>
		/// 	Gets or Sets the Title property. 
		///		
		/// </summary>
		/// <value>This type is varchar</value>
		[DescriptionAttribute("")]
		public System.String Title
		{
			get { return _Title; }
			set
			{
				if (_Title == value)
					return;
					
				OnBeforeChanged(CourseSectionColumns.Title);
				_Title = value;
				_isdirty = true;
				OnAfterChanged(CourseSectionColumns.Title);
			}
		}
	
		/// <summary>
		/// 	Gets or Sets the Description property. 
		///		
		/// </summary>
		/// <value>This type is varchar</value>
		[DescriptionAttribute("")]
		public System.String Description
		{
			get { return _Description; }
			set
			{
				if (_Description == value)
					return;
					
				OnBeforeChanged(CourseSectionColumns.Description);
				_Description = value;
				_isdirty = true;
				OnAfterChanged(CourseSectionColumns.Description);
			}
		}
	
		/// <summary>
		/// 	Gets or Sets the Capacity property. 
		///		
		/// </summary>
		/// <value>This type is int</value>
		[DescriptionAttribute("")]
		public System.Int32 Capacity
		{
			get { return _Capacity; }
			set
			{
				if (_Capacity == value)
					return;
					
				OnBeforeChanged(CourseSectionColumns.Capacity);
				_Capacity = value;
				_isdirty = true;
				OnAfterChanged(CourseSectionColumns.Capacity);
			}
		}
	
		/// <summary>
		/// 	Gets or Sets the CourseID property. 
		///		
		/// </summary>
		/// <value>This type is int</value>
		[DescriptionAttribute("")]
		public System.Int32 CourseID
		{
			get { return _CourseID; }
			set
			{
				if (_CourseID == value)
					return;
					
				OnBeforeChanged(CourseSectionColumns.CourseID);
				_CourseID = value;
				_isdirty = true;
				OnAfterChanged(CourseSectionColumns.CourseID);
			}
		}
	
		/// <summary>
		/// 	Gets or Sets the ClassID property. 
		///		
		/// </summary>
		/// <value>This type is varchar</value>
		[DescriptionAttribute("")]
		public System.String ClassID
		{
			get { return _ClassID; }
			set
			{
				if (_ClassID == value)
					return;
					
				OnBeforeChanged(CourseSectionColumns.ClassID);
				_ClassID = value;
				_isdirty = true;
				OnAfterChanged(CourseSectionColumns.ClassID);
			}
		}
	
		/// <summary>
		/// 	Gets or Sets the Status property. 
		///		
		/// </summary>
		/// <value>This type is int</value>
		[DescriptionAttribute("")]
		public System.Int32 Status
		{
			get { return _Status; }
			set
			{
				if (_Status == value)
					return;
					
				OnBeforeChanged(CourseSectionColumns.Status);
				_Status = value;
				_isdirty = true;
				OnAfterChanged(CourseSectionColumns.Status);
			}
		}
	
		/// <summary>
		/// 	Gets or Sets the Type property. 
		///		
		/// </summary>
		/// <value>This type is int</value>
		[DescriptionAttribute("")]
		public System.Int32 Type
		{
			get { return _Type; }
			set
			{
				if (_Type == value)
					return;
					
				OnBeforeChanged(CourseSectionColumns.Type);
				_Type = value;
				_isdirty = true;
				OnAfterChanged(CourseSectionColumns.Type);
			}
		}
	
		/// <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(CourseSectionColumns.ChangeStamp);
				_ChangeStamp = value;
				_isdirty = true;
				OnAfterChanged(CourseSectionColumns.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 "CourseSection"; }
		}

private CourseTakenByStudentCollection _CourseTakenByStudentCollection = new CourseTakenByStudentCollection();
	
/// <summary>
///	Holds a collection of CourseTakenByStudent objects
///	which are related to this object through the relation FK_CourseTakenByStudent_Section
/// </summary>	
public CourseTakenByStudentCollection CourseTakenByStudentCollection
{
	get { return _CourseTakenByStudentCollection; }
	set { _CourseTakenByStudentCollection = value; }	
}

private SectionRoutineCollection _SectionRoutineCollection = new SectionRoutineCollection();
	
/// <summary>
///	Holds a collection of SectionRoutine objects
///	which are related to this object through the relation FK_SectionRoutine_Section
/// </summary>	
public SectionRoutineCollection SectionRoutineCollection
{
	get { return _SectionRoutineCollection; }
	set { _SectionRoutineCollection = value; }	
}
		
		#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 CourseSectionBase Entity 
		///</summary>
		public virtual CourseSectionBase Copy()
		{
			//shallow copy entity
			CourseSection copy = new CourseSection();
			copy.ID = this._ID;
			copy.Title = this._Title;
			copy.Description = this._Description;
			copy.Capacity = this._Capacity;
			copy.CourseID = this._CourseID;
			copy.ClassID = this._ClassID;
			copy.Status = this._Status;
			copy.Type = this._Type;
			copy.ChangeStamp = this._ChangeStamp;
					
			copy.AcceptChanges();
			return (CourseSection)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="CourseSectionBase"/> and has the same value as this instance; otherwise, false.</returns>
		public bool Equals(CourseSectionBase toObject)
		{
			return Equals(this, toObject);
		}
		
		
		///<summary>
		/// Determines whether the specified <see cref="CourseSectionBase"/> instances are considered equal.
		///</summary>
		///<param name="Object1">The first <see cref="CourseSectionBase"/> to compare.</param>
		///<param name="Object2">The second <see cref="CourseSectionBase"/> 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(CourseSectionBase Object1, CourseSectionBase Object2)
		{
			bool equal = true;
			if (Object1.ID != Object2.ID)
				equal = false;
			if (Object1.Title != Object2.Title)
				equal = false;
			if (Object1.Description != Object2.Description)
				equal = false;
			if (Object1.Capacity != Object2.Capacity)
				equal = false;
			if (Object1.CourseID != Object2.CourseID)
				equal = false;
			if (Object1.ClassID != Object2.ClassID)
				equal = false;
			if (Object1.Status != Object2.Status)
				equal = false;
			if (Object1.Type != Object2.Type)
				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(((CourseSectionBase)obj).ID);
		}
	
		#endregion
		
			
		#region "IsColumnNull"
		#endregion "IsColumnNull"
		
		///<summary>
		/// Returns a String that represents the current object.
		///</summary>
		public override string ToString()
		{
			return string.Format("{10}{9}- ID: {0}{9}- Title: {1}{9}- Description: {2}{9}- Capacity: {3}{9}- CourseID: {4}{9}- ClassID: {5}{9}- Status: {6}{9}- Type: {7}{9}- ChangeStamp: {8}{9}", ID, Title, Description, Capacity, CourseID, ClassID, Status, Type, ChangeStamp, Environment.NewLine, this.GetType());
		}
	
	}//End Class
	
	
	/// <summary>
	/// Enumerate the CourseSection columns.
	/// </summary>
	public enum CourseSectionColumns
	{
		/// <summary>
		/// ID : 
		/// </summary>
		ID,
		/// <summary>
		/// Title : 
		/// </summary>
		Title,
		/// <summary>
		/// Description : 
		/// </summary>
		Description,
		/// <summary>
		/// Capacity : 
		/// </summary>
		Capacity,
		/// <summary>
		/// CourseID : 
		/// </summary>
		CourseID,
		/// <summary>
		/// ClassID : 
		/// </summary>
		ClassID,
		/// <summary>
		/// Status : 
		/// </summary>
		Status,
		/// <summary>
		/// Type : 
		/// </summary>
		Type,
		/// <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

Share

About the Author

Omar Al Zabir
Architect BT, UK (ex British Telecom)
United Kingdom United Kingdom

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.141216.1 | Last Updated 17 Aug 2005
Article Copyright 2005 by Omar Al Zabir
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid