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 void Application_Start(Object sender, EventArgs e) { SplendidInit.InitApp(); InitSchedulerManager(); }
protected void Application_Start(Object sender, EventArgs e) { SplendidInit.InitApp(); }