D:\NorthwindForWeb\Northwind\CS\DotNet\ADO.Net\Northwind\WebControls\UserControlBase.cs
/*
* This file was generated by ProCG version 2.0
*
* File name: Northwind\WebControls\UserControlBase.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}:NorthwindUserControl runat=server></{0}:NorthwindUserControl>")]
public class NorthwindUserControlBase : UserControl, 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 NorthwindUserControlBase()
{
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);
}
}
}
// 5563 ProCG uses this line - don't edit it