Click here to Skip to main content
15,886,362 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
#region Using directives

using System;
using System.Collections.Generic;
using System.Text;
using SmartInstitute.ObjectModel;
using System.Windows.Forms;
using SmartInstitute.Client.Automation.Views;
using SmartInstitute;

#endregion

namespace SmartInstitute.Client.Automation.Documents.StudentDocuments
{
	/// <summary>
	/// Shows details about the student model
	/// </summary>
	public class StudentDocument : DocumentBase
	{
		private GenericCollection<DocumentBase> _ChildViews;

		public GenericCollection<DocumentBase> ChildViews
		{
			get { return _ChildViews; }
			set { _ChildViews = value; }
		}

		public StudentDocument( StudentModel model, StudentDocumentUI ui, bool showRegistrationView, object parent ) 
			: base( model.StudentID, model.FullName, ui, parent )
		{
			this._StudentModel = model;
			this._ShowRegistrationView = showRegistrationView;
		}

		private StudentModel _StudentModel;

		public StudentModel StudentModel
		{
			get { return _StudentModel; }
			set { _StudentModel = value; }
		}

		private bool _ShowRegistrationView;

		public bool ShowRegistrationView
		{
			get { return _ShowRegistrationView; }
			set { _ShowRegistrationView = value; }
		}
	

		public override bool IsFeatureSupported(object feature)
		{
			throw new NotImplementedException();
		}

		public override bool CanAccept(object data)
		{
			if (data is CourseSection)
				return true;
			else
				return false;
		}

		public override bool Accept(object data)
		{
			if (data is Course)
			{
				if (null == OnAddCourse)
					return false;
				else
					return OnAddCourse(data as Course);
			}
			else if (data is CourseSection)
			{
				if (null == OnAddSection)
					return false;
				else
					return OnAddSection(data as CourseSection);
			}
			else
			{
				return false;
			}
		}


		/// <summary>
		/// Delegate used when a course is sent to the student view
		/// </summary>
		/// <param name="course"></param>
		public delegate bool AddCourseHandler(Course course);
		public event AddCourseHandler OnAddCourse;

		public delegate bool AddSectionHandler(CourseSection section);
		public event AddSectionHandler OnAddSection;


	}
}

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