private void InitializeView(CallStandardAction action, ModuleRequestForMembership module, int idCommunity, CallStatusForSubmitters preloadView, Boolean allowView, Boolean allowManage) { List <CallStatusForSubmitters> views = Service.GetAvailableViews(action, (module.ManageBaseForPapers || module.Administration), (action == CallStandardAction.List && idCommunity == 0), (idCommunity == 0), idCommunity, UserContext.CurrentUserID, CallForPaperType.RequestForMembership); if (!views.Contains(preloadView) && views.Count == 0) { preloadView = CallStatusForSubmitters.SubmissionOpened; views.Add(CallStatusForSubmitters.SubmissionOpened); } else if (!views.Contains(preloadView)) { preloadView = views[0]; } View.LoadAvailableView(idCommunity, views); View.CurrentView = preloadView; switch (action) { case CallStandardAction.List: View.AllowManage = allowManage; if (allowManage) { View.SetActionUrl(CallStandardAction.Manage, RootObject.ViewCalls(CallForPaperType.RequestForMembership, CallStandardAction.Manage, idCommunity, preloadView)); } break; case CallStandardAction.Manage: if (module.CreateBaseForPaper || module.Administration) { View.SetActionUrl(CallStandardAction.Add, RootObject.AddCall(CallForPaperType.RequestForMembership, idCommunity, View.CurrentView)); } View.AllowView = allowView; if (allowView) { View.SetActionUrl(CallStandardAction.List, RootObject.ViewCalls(CallForPaperType.RequestForMembership, CallStandardAction.List, idCommunity, preloadView)); } break; } if (action == CallStandardAction.Manage) { List <FilterCallVisibility> filters = Service.GetCallVisibilityFilters(module, (idCommunity == 0), idCommunity, UserContext.CurrentUserID, preloadView); View.LoadAvailableFilters(filters, (filters.Count == 0) ? FilterCallVisibility.OnlyVisible : filters[0]); } }