using System;
using System.ComponentModel;
using System.Web.UI;
using System.Web.UI.WebControls;
using DataHolder.Containers;
using DataHolder.DataPersistence.DBAProvider;
namespace DBWebControls.Controls{
/// <summary>
/// Summary description for GenericListPage.
/// </summary>
public class GenericEditPage :System.Web.UI.Page
{
private ControlsBinder MainControls;
protected WebNavigator.NavEditPageState CurrentPage;
protected WebNavigator.PageNavigator Navigator;
public void InitEditPage( ControlsBinder p_MainControls)
{
MainControls = p_MainControls;
}
#region PageOverrides
protected override void OnLoad(EventArgs e)
{
Navigator = WebNavigator.PageNavigator.GetNavigator(this);
//because on web another web type is created
CurrentPage = (WebNavigator.NavEditPageState)Navigator[this.GetType().BaseType];
base.OnLoad (e);
if(IsPostBack)
MainControls.GetValuesFromControls(CurrentPage.EditState.MainData);
}
protected override void OnPreRender(EventArgs e)
{
MainControls.SetValuesToControls(CurrentPage.EditState.MainData);
base.OnPreRender (e);
}
#endregion
}
}
|