protected override void OnInit(EventArgs e) { if (Request["PrecompileOnly"] == "1") { Response.End(); } if (Sql.IsEmptyString(Application["imageURL"])) { SplendidInit.InitSession(); } if (AuthenticationRequired()) { if (Sql.IsEmptyGuid(Security.USER_ID)) { Response.Redirect("~/Users/Login.aspx"); } } // 08/30/2005 Paul. Apply the new culture at the page level so that it is only applied once. GetL10n(); GetT10n(); GetC10n(); // 04/30/2006 Paul. Use the Context to store pointers to the localization objects. // This is so that we don't need to require that the page inherits from SplendidPage. // A port to DNN prompted this approach. Context.Items["L10n"] = GetL10n(); Context.Items["T10n"] = GetT10n(); Context.Items["C10n"] = GetC10n(); base.OnInit(e); }
private void Page_Load(object sender, System.EventArgs e) { Assembly asm = Assembly.GetExecutingAssembly(); sBuildNumber = asm.GetName().Version.ToString(); // 01/20/2006 Paul. Expire immediately. Response.ExpiresAbsolute = new DateTime(1980, 1, 1, 0, 0, 0, 0); try { // 11/20/2005 Paul. ASP.NET 2.0 has a namespace conflict, so we need the full name for the SplendidCRM factory. SplendidCRM.DbProviderFactory dbf = SplendidCRM.DbProviderFactories.GetFactory(); using (IDbConnection con = dbf.CreateConnection()) { con.Open(); } } catch (Exception ex) { //SplendidError.SystemError(new StackTrace(true).GetFrame(0), ex.Message); Response.Write(ex.Message + "<br>"); } try { // 08/17/2006 Paul. A customer reported a problem with a view missing columns. // Provide a way to recompile the views. if (Request.QueryString["Recompile"] == "1" || Request.QueryString["Reload"] == "1" || Sql.IsEmptyString(Application["imageURL"])) { // 12/20/2005 Paul. Require admin rights to reload. if (SplendidCRM.Security.IS_ADMIN) { if (Request.QueryString["Recompile"] == "1") { SqlProcs.spSqlRefreshAllViews(); } SplendidInit.InitApp(); if (!Sql.IsEmptyGuid(Security.USER_ID)) { SplendidInit.LoadUserPreferences(Security.USER_ID, Sql.ToString(Session["USER_SETTINGS/THEME"]), Sql.ToString(Session["USER_SETTINGS/CULTURE"])); } } else { SplendidError.SystemError(new StackTrace(true).GetFrame(0), "You must be an administrator to reload the application."); Response.Write("You must be an administrator to reload the application." + "<br>"); } } } catch (Exception ex) { //SplendidError.SystemError(new StackTrace(true).GetFrame(0), ex.Message); Response.Write(ex.Message + "<br>"); } Page.DataBind(); }
protected override void OnInit(EventArgs e) { if (Request["PrecompileOnly"] == "1") { Response.End(); } if (Sql.IsEmptyString(Application["imageURL"])) { SplendidInit.InitSession(); } if (AuthenticationRequired()) { // 11/17/2007 Paul. New function to determine if user is authenticated. if (!Security.IsAuthenticated()) { Response.Redirect("~/Users/Login.aspx"); } } // 11/27/2006 Paul. We want to show the SQL on the Demo sites, so add a config variable to allow it. bDebug = Sql.ToBoolean(Application["CONFIG.show_sql"]); #if DEBUG bDebug = true; #endif // 08/30/2005 Paul. Apply the new culture at the page level so that it is only applied once. GetL10n(); GetT10n(); GetC10n(); // 04/30/2006 Paul. Use the Context to store pointers to the localization objects. // This is so that we don't need to require that the page inherits from SplendidPage. // A port to DNN prompted this approach. Context.Items["L10n"] = GetL10n(); Context.Items["T10n"] = GetT10n(); Context.Items["C10n"] = GetC10n(); base.OnInit(e); }
protected void Session_Start(Object sender, EventArgs e) { SplendidInit.InitSession(); }
protected void Application_Start(Object sender, EventArgs e) { SplendidInit.InitApp(); InitSchedulerManager(); }
protected void Application_Start(Object sender, EventArgs e) { SplendidInit.InitApp(); }