void Page_PreInit(object sender, EventArgs e) { context = new EntitiesContext(); portals = new Portals(context); //////Set PortalID override //Session["PortalID"] = 2; //PROJECT=BLL&NAMESPACE=BLL.Store&CLASS=Category&METHOD=StoreCategoryList //PROJECT=BLL&NAMESPACE=BLL&CLASS=Content&METHOD=ReadContent&PARAMS=Home.aspx,IsAjax //////Auto login if (Session["UserID"] == null) { BLL.Users.Login("*****@*****.**", "*****@*****.**"); } var values = new Hashtable(); values = portals.GetSiteConfig(); if (values["MasterPage"] != null) { MasterPageFile = "~/App_Master/" + values["MasterPage"].ToString(); } if (values["StartMethod"] != null) { StartMethod = values["StartMethod"].ToString(); } }
protected void Page_Init(object sender, EventArgs e) { // Initializes the Portals object using the EntitiesContext for the current request this.portals = new Portals(Utils.DbContext); }
protected void Page_Init(object sender, EventArgs e) { this.context = new EntitiesContext(); this.portals = new Portals(context); }
public void PortalIDTest() { Portals portals = new Portals(Utils.DbContext); int actual = portals.PortalID; }
protected void Page_Init(object sender, EventArgs e) { this.portals = new Portals(Utils.DbContext); }
void Session_Start(object sender, EventArgs e) { // Code that runs when a new session is started BLL.Portals portal = new Portals(Utils.DbContext); Session["PortalID"] = portal.PortalID; }