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

Win-Form/Web-Form Generic Components using the same Controller

Rate me:
Please Sign up or sign in to vote.
4.00/5 (7 votes)
5 Oct 2008CPOL7 min read 43K   1.1K   36  
A framework to develop Win-Form and Web-Form applications using generic components
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Collections;
using Framework.UI.baWebControls;
using App.Controller;
using Framework.baInterfaces;
using Framework.UI.baController;

namespace baWebForm.BaseFrm
{
	/// <summary>
    /// LookupForm
    ///     The user interface for Geo Form
	/// </summary>
    public partial class LookupForm : Framework.UI.baWebControls.WebPageBase, IGeoForm
	{
        //protected GeoCtrl ctrl;

		protected void Page_Load(object sender, System.EventArgs e)
		{
			// Put user code to initialize the page here
            GeoCtrl ctrl = new GeoCtrl(this, RelationKind.Lookup);
		}

		#region Web Form Designer generated code
		override protected void OnInit(EventArgs e)
		{
			//
			// CODEGEN: This call is required by the ASP.NET Web Form Designer.
			//
			InitializeComponent();
			base.OnInit(e);
		}
		
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{    

		}
		#endregion

        public string Caption
        {
            get
            {
                return this.Title;
            }
            set
            {
                this.Title = value;
            }
        }

        public IComboBox GeoTblKind
        {
            get
            {
                return this.GeoTblKindCombo;
            }
        }

		public IAddEditDelete AddEditDel
		{
			get
			{
                // TODO:  Add LookupForm.AddEditDel getter implementation
				return addEditDelMasterCtrl;
			}
		}

        public ITextBox GeoTblName
		{
			get
			{
				return GeoTblNameTxt;
			}
		}

        public IBindingManager BindingManager
        {
            get
            {
                return GeoBindingManager;
            }
        }

        public IBindingRelation BindingRelation
        {
            get
            {
                return GeoBindingRelation;
            }
        }

        public ITreeView GeoTblTreeView
        {
            get
            {
                return this.GeoTblBaTreeView;
            }
        }

        public IGrid GeoTblGrid
        {
            get
            {
                return this.GeoTablebaGrid;
            }
        }

        public IGrid EntityTableGrid
        {
            get
            {
                return this.EntityTableBaGrid;
            }
        }

        public IBindingManager DetailBindingManager
        {
            get
            {
                return LocationBindingManager;
            }
        }

        public IComboBox EntityCombo
        {
            get
            {
                return EntityComboView;
            }
        }

        public IAddEditDelete addEditDelDetail
        {
            get
            {
                return addEditDelDetailCtrl;
            }
        }

        public ITextBox EntityTextBox
        {
            get
            {
                return EntityTextBoxView;
            }
        }

}
}

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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Canada Canada
Software development experience since 1993

Skills
- Programming Languages: C# .NET, Delphi, C++, Java and VB
- Development Methodologies (SDLC): RUP, Scrum and XP
- Database: SQL server, Oracle, Apollo database and MS Access.

Educations & Certificates
- Microsoft® Certified Professional (MCP)
- Sun® Certified Java2 Programmer
- B.S. in computer science

Comments and Discussions