/// <summary> /// Loads the exception occurrences panel /// </summary> /// <param name="exceptionId">The Id of the base exception for the grid</param> private void LoadExceptionOccurrences(int exceptionId) { //get the base exception ExceptionLogService exceptionService = new ExceptionLogService(); ExceptionLog exception = exceptionService.Get(exceptionId); //set the summary fields for the base exception if (exception != null) { this.AddHistory("Exception", exceptionId.ToString(), string.Format("Exception Occurrences {0}", exception.Description)); hfBaseExceptionID.Value = exceptionId.ToString(); var descriptionList = new Rock.Web.DescriptionList(); if (exception.Site != null) { descriptionList.Add("Site", exception.Site.Name); } if (exception.Page != null) { descriptionList.Add("Page", exception.Page.InternalName); } if (!string.IsNullOrEmpty(exception.ExceptionType)) { descriptionList.Add("Type", exception.ExceptionType); } lblMainDetails.Text = descriptionList.Html; //Load the occurrences for the selected exception BindExceptionOccurrenceGrid(exception); } }
/// <summary> /// Loads the exception occurrences panel /// </summary> /// <param name="exceptionId">The Id of the base exception for the grid</param> private void ShowDetail(int exceptionId) { //get the base exception ExceptionLogService exceptionService = new ExceptionLogService(new RockContext()); ExceptionLog exception = exceptionService.Get(exceptionId); //set the summary fields for the base exception if (exception != null) { if (Page.IsPostBack && Page.IsAsync) { this.AddHistory("ExceptionId", exceptionId.ToString(), string.Format("Exception Occurrences {0}", exception.Description)); } hfBaseExceptionID.Value = exceptionId.ToString(); var descriptionList = new Rock.Web.DescriptionList(); // set detail title with formating lDetailTitle.Text = String.Format("Occurrences of {0}", exception.ExceptionType).FormatAsHtmlTitle(); if (!string.IsNullOrEmpty(exception.ExceptionType)) { descriptionList.Add("Type", exception.ExceptionType); } if (exception.Site != null) { descriptionList.Add("Site", exception.Site.Name); } if (exception.Page != null) { descriptionList.Add("Page", exception.Page.InternalName); } lblMainDetails.Text = descriptionList.Html; //Load the occurrences for the selected exception BindExceptionOccurrenceGrid(exception); } }
/// <summary> /// Loads the exception occurrences panel /// </summary> /// <param name="exceptionId">The Id of the base exception for the grid</param> private void LoadExceptionOccurrences( int exceptionId ) { //get the base exception ExceptionLogService exceptionService = new ExceptionLogService( new RockContext() ); ExceptionLog exception = exceptionService.Get( exceptionId ); //set the summary fields for the base exception if ( exception != null ) { if ( Page.IsPostBack && Page.IsAsync ) { this.AddHistory( "Exception", exceptionId.ToString(), string.Format( "Exception Occurrences {0}", exception.Description ) ); } hfBaseExceptionID.Value = exceptionId.ToString(); var descriptionList = new Rock.Web.DescriptionList(); // set detail title with formating lDetailTitle.Text = String.Format( "Occurrences of {0}", exception.ExceptionType ).FormatAsHtmlTitle(); if ( !string.IsNullOrEmpty( exception.ExceptionType ) ) { descriptionList.Add( "Type", exception.ExceptionType ); } if ( exception.Site != null ) { descriptionList.Add( "Site", exception.Site.Name ); } if ( exception.Page != null ) { descriptionList.Add( "Page", exception.Page.InternalName ); } lblMainDetails.Text = descriptionList.Html; //Load the occurrences for the selected exception BindExceptionOccurrenceGrid( exception ); } }