public void InitView(Int32 idCommunity, Boolean fromPage, String url = "", Boolean fromSession = false)
 {
     if (UserContext.isAnonymous)
     {
         View.DisplaySessionTimeout();
     }
     else
     {
         if (fromSession && idCommunity == 0)
         {
             idCommunity = UserContext.CurrentCommunityID;
         }
         View.DashboardIdCommunity = idCommunity;
         liteCommunityInfo community = CurrentManager.GetLiteCommunityInfo(idCommunity);
         if (community == null)
         {
             View.DisplayUnknownCommunity();
             View.SendUserAction(UserContext.CurrentCommunityID, CurrentIdModule, idCommunity, ModuleDashboard.ActionType.LoadingUnknownCommunityDetails);
         }
         else
         {
             View.SetTitle(community.Name);
             View.SendUserAction(UserContext.CurrentCommunityID, CurrentIdModule, idCommunity, ModuleDashboard.ActionType.LoadingCommunityDetails);
             View.InitializeDetails(community);
         }
     }
 }
 public void InitView(Int32 idCommunity)
 {
     if (UserContext.isAnonymous)
     {
         View.DisplaySessionTimeout();
     }
     else
     {
         if (idCommunity == 0)
         {
             View.RedirectToPortalHomePage();
         }
         else
         {
             liteCommunityInfo community = CurrentManager.GetLiteCommunityInfo(idCommunity);
             if (community == null)
             {
                 View.DisplayUnknownCommunity();
             }
             else if (community.isClosedByAdministrator)
             {
                 View.DisplayCommunityBlock(community.Name);
             }
             else
             {
                 liteSubscriptionInfo subscription = CurrentManager.GetLiteSubscriptionInfo(UserContext.CurrentUserID, idCommunity);
                 if (subscription == null || subscription.IdRole < 0)
                 {
                     View.DisplayNotEnrolledIntoCommunity(community.Name);
                 }
                 else if (subscription.Accepted && subscription.Enabled)
                 {
                     View.LogonToCommunity(idCommunity, UserContext.CurrentUserID);
                 }
                 else if (subscription.Accepted && !subscription.Enabled)
                 {
                     View.DisplayNoAccessToCommunity(community.Name);
                 }
                 else if (!subscription.Accepted && !subscription.Enabled)
                 {
                     View.DisplayWaitingActivaction(community.Name);
                 }
             }
         }
     }
 }