Skip Navigation Links.

Northwind\WebControls\CompositeControlBase.cs

D:\NorthwindForWeb\Northwind\CS\DotNet\ADO.Net\Northwind\WebControls\CompositeControlBase.cs
/*
 * This file was generated by ProCG version 2.0
 *
 * File name:	Northwind\WebControls\CompositeControlBase.cs
 * Language:	C# - ADO.Net 
 * Database:	My Sql
 *
 * Copyright (c) 2002-2019 iGenXSoft.
 * For more information visit http://www.igenxsoft.com
 */

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Northwind.Data;

namespace Northwind.WebControls
{
	[ToolboxData("<{0}:NorthwindCompositeControl runat=server></{0}:NorthwindCompositeControl>")]
	public class NorthwindCompositeControlBase : CompositeControl, NorthwindControlInterface
	{
		private NorthwindControl m_NorthwindControl;

		protected NorthwindControl NorthwindControl
		{
			get 
			{
				if (m_NorthwindControl.Page == null)
					m_NorthwindControl.Page = this.Page;
				return m_NorthwindControl; 
			}
			set { m_NorthwindControl = value; }
		}

		public NorthwindCompositeControlBase()
		{
			m_NorthwindControl = new NorthwindControl(this, this.ViewState);
		}

		protected override void OnInit(EventArgs e)
		{
			base.OnInit(e);

		}

		protected override void OnLoad(EventArgs e)
		{
			base.OnLoad(e);
			//m_NorthwindControl = new NorthwindControl(this, this.ViewState);
		}

		protected override void CreateChildControls()
		{
			base.CreateChildControls();
		}


		#region NorthwindControlInterface Members

		public CollectionDataSourceWCC CollectionDataSourceControl
		{
			get { return NorthwindControl.CollectionDataSourceControl; }
		}

		public string CollectionDataSourceControlId
		{
			get
			{
				return NorthwindControl.CollectionDataSourceControlId;
			}
			set
			{
				NorthwindControl.CollectionDataSourceControlId = value;
			}
		}

		public Northwind.Data.DataManager DataManager
		{
			get
			{
				return NorthwindControl.DataManager;
			}
			set
			{
				if (!NorthwindControl.DataManager.Equals(value))
				{
					NorthwindControl.DataManager = value;
					OnDataManagerWasSet();
				}
			}
		}

		protected virtual void OnDataManagerWasSet()
		{
		}

		public ComboBoxManager ComboBoxManager
		{
			get
			{
				return NorthwindControl.ComboBoxManager;
			}
			set
			{
				NorthwindControl.ComboBoxManager = value;
			}
		}

		public virtual void GetViewState(string symbolName, ref int symbolValue, int defaultValue)
		{
			if (this.ViewState[symbolName] != null)
			{
				symbolValue = Convert.ToInt32(ViewState[symbolName].ToString());
			}
			else
			{
				symbolValue = defaultValue;
			}
		}

		public virtual int SetViewState(string symbolName, int symbolValue)
		{
			this.ViewState[symbolName] = symbolValue;
			return (symbolValue);
		}

		public virtual void GetViewState(string symbolName, ref bool symbolValue, bool defaultValue)
		{
			if (this.ViewState[symbolName] != null)
			{
				symbolValue = Convert.ToBoolean(ViewState[symbolName].ToString());
			}
			else
			{
				symbolValue = defaultValue;
			}
		}

		public virtual bool SetViewState(string symbolName, bool symbolValue)
		{
			this.ViewState[symbolName] = symbolValue;
			return (symbolValue);
		}


		public virtual CStructData Data
		{
			get 
			{
				if (this.DesignMode)
					return null;
				
				return NorthwindControl.Data; 
			}
			set
			{
				NorthwindControl.Data = value;
			}			
		}

		public int Index
		{
			get
			{
				return NorthwindControl.Index;
			}
			set
			{
				Data = null;
				NorthwindControl.Index = value;
			}
		}

		public int DataIndex
		{
			get
			{
				if (this.DesignMode)
					return 0;

				return NorthwindControl.DataIndex;
			}
		}

		public IStructDataCollection DataCollection
		{
			get 
			{
				if (this.DesignMode)
					return null;

				return NorthwindControl.DataCollection; 
			}
		}

		[Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
		public NorthwindWebEnv WebEnv
		{
			get
			{
				if (NorthwindControl.WebEnv == null)
					NorthwindControl.WebEnv = CreateWebEnv();
				return NorthwindControl.WebEnv;
			}
			set
			{
				NorthwindControl.WebEnv = value;
			}
		}

		protected virtual NorthwindWebEnv CreateWebEnv()
		{
			throw new NotImplementedException("CReateWebEnv must be implemented for "+ this.GetType().ToString());
		}

		public void DataChangedByClient()
		{
			NorthwindControl.DataChangedByClient();
		}

		#endregion

		[Browsable(true)]
		public string CollectionDataInstanceName
		{
			get
			{
				return NorthwindControl.CollectionDataInstanceName;
			}
			set
			{
				NorthwindControl.CollectionDataInstanceName = value;
			}
		}

		[Browsable(true)]
		public string DataInstanceName
		{
			get
			{
				return NorthwindControl.DataInstanceName;
			}
			set
			{
				NorthwindControl.DataInstanceName = value;
			}
		}

		public System.Collections.IDictionary DataObjectsContainer
		{
			get
			{
				return NorthwindControl.DataObjectsContainer;
			}
			set
			{
				NorthwindControl.DataObjectsContainer = value;
			}
		}


		public bool KeepDataInSession
		{
			get
			{
				return NorthwindControl.KeepDataInSession;
			}
			set
			{
				NorthwindControl.KeepDataInSession = value;
			}
		}

		protected void SetDataToCollection(CStructData value)
		{
			NorthwindControl.SetDataToCollection(value);
		}

	}
}




  //      5599 ProCG uses this line - don't edit it

2020 © iGenXSoft ProCG Generated Codes
pompy wtryskowe|cheap huarache shoes| bombas inyeccion|cheap jordans|cheap air max| cheap sneaker|wholesale jordans|cheap china jordans|cheap wholesale jordans