예제 #1
0
 /// <summary>
 /// Get all published Pivot collection
 /// </summary>
 /// <returns>returns list of PublishingCollectionItem</returns>
 public IEnumerable <PublishingCollectionItem> GetAllPivotCollectionItems()
 {
     try
     {
         PublishingCollectionItems pivotCollectionItems = PivotCollectionHelper.GetAllPivotCollectionItemsForPivot(this.Context.Request);
         Session[Properties.Messages.PivotCollectionItemsForSorting] = pivotCollectionItems;
         ViewState.Add(Properties.Messages.SortingDirection, Properties.Messages.Ascending);
         ViewState.Add(Properties.Messages.SortingColumn, "ResourceType");
         return(pivotCollectionItems.OrderBy(p => p.ResourceType));
     }
     catch (System.ServiceModel.EndpointNotFoundException)
     {
         this.errorSummaryContainer.Visible = true;
         this.collectionsGrid.Visible       = false;
         return(null);
     }
     catch (System.TimeoutException)
     {
         this.errorMessageSpan.InnerText    = Properties.Messages.ConnectionTimedOut;
         this.errorSummaryContainer.Visible = true;
         this.collectionsGrid.Visible       = false;
         return(null);
     }
     catch (System.ServiceModel.FaultException exception)
     {
         Zentity.Services.Web.Globals.TraceMessage(System.Diagnostics.TraceEventType.Error, exception.ToString(), exception.Message);
         this.errorMessageSpan.InnerText    = Properties.Messages.ZentityServerAccessError;
         this.errorSummaryContainer.Visible = true;
         this.collectionsGrid.Visible       = false;
         return(null);
     }
     catch (System.Exception exception)
     {
         Zentity.Services.Web.Globals.TraceMessage(System.Diagnostics.TraceEventType.Error, exception.ToString(), exception.Message);
         this.errorMessageSpan.InnerText    = Properties.Messages.ZentityServerAccessError;
         this.errorSummaryContainer.Visible = true;
         this.collectionsGrid.Visible       = false;
         return(null);
     }
 }