Пример #1
0
        private void SetBackUrls(PageListType fromPage, Int32 idContainerCommunity, dtoProject project, dtoProjectContext cContext)
        {
            switch (fromPage)
            {
            case PageListType.ListAdministrator:
            case PageListType.ListManager:
            case PageListType.ListResource:
                View.SetProjectsUrl(Service.GetBackUrl(fromPage, idContainerCommunity, (project == null) ? 0: project.Id));
                break;

            case PageListType.DashboardManager:
            case PageListType.DashboardResource:
            case PageListType.DashboardAdministrator:
                if (project != null)
                {
                    View.SetDashboardUrl(RootObject.DashboardFromCookies(cContext, idContainerCommunity, fromPage, project.Id), fromPage);
                }
                break;

            case PageListType.ProjectDashboardManager:
            case PageListType.ProjectDashboardResource:
                if (project != null)
                {
                    View.SetDashboardUrl(RootObject.ProjectDashboardFromCookies(cContext, idContainerCommunity, fromPage, project.Id), fromPage);
                }
                break;
            }
            if (project != null)
            {
                View.SetProjectMapUrl(RootObject.ProjectMap(project.Id, project.IdCommunity, project.isPortal, project.isPersonal, fromPage, idContainerCommunity));
            }
        }
Пример #2
0
        private void SetBackUrls(PageListType fromPage, Int32 idContainerCommunity, dtoProject project, dtoProjectContext cContext)
        {
            switch (fromPage)
            {
            case PageListType.ListAdministrator:
            case PageListType.ListManager:
            case PageListType.ListResource:
                View.SetProjectsUrl(Service.GetBackUrl(fromPage, idContainerCommunity, project.Id));
                break;

            case PageListType.DashboardManager:
            case PageListType.DashboardResource:
            case PageListType.DashboardAdministrator:
                View.SetDashboardUrl(RootObject.DashboardFromCookies(cContext, idContainerCommunity, fromPage, project.Id), fromPage);
                break;

            case PageListType.ProjectDashboardManager:
            case PageListType.ProjectDashboardResource:
                View.SetDashboardUrl(RootObject.ProjectDashboardFromCookies(cContext, idContainerCommunity, fromPage, project.Id), fromPage);
                break;
            }
        }
Пример #3
0
        private void InitializeBackUrl(long idProject, Int32 idCommunity, dtoProjectContext cContext, TabListItem tabItem, PageListType fromPage)
        {
            switch (tabItem)
            {
            case TabListItem.Manager:
                switch (fromPage)
                {
                case PageListType.DashboardResource:
                    View.SetLinkToDashBoardAsResource(RootObject.DashboardFromCookies(cContext, idCommunity, PageListType.DashboardResource, idProject));
                    View.SetLinkToProjectsAsManager(RootObject.ProjectListResource(cContext.IdCommunity, cContext.isForPortal, cContext.isPersonal, false, idProject, ItemsGroupBy.Plain, View.PreloadFilterBy, View.PreloadFilterStatus, View.PreloadTimeLine, View.PreloadDisplay));
                    break;

                case PageListType.ListResource:
                    View.SetLinkToProjectsAsManager(RootObject.ProjectListResource(idCommunity, cContext.isForPortal, cContext.isPersonal, true, idProject));
                    break;

                case PageListType.DashboardManager:
                    View.SetLinkToDashBoardAsResource(RootObject.DashboardFromCookies(cContext, idCommunity, PageListType.DashboardManager, idProject));
                    View.SetLinkToProjectsAsResource(RootObject.ProjectListManager(cContext.IdCommunity, cContext.isForPortal, cContext.isPersonal, false, idProject, ItemsGroupBy.Plain, View.PreloadFilterBy, View.PreloadFilterStatus, View.PreloadTimeLine, View.PreloadDisplay));
                    break;

                case PageListType.ListManager:
                    View.SetLinkToProjectsAsManager(RootObject.ProjectListManager(idCommunity, cContext.isForPortal, cContext.isPersonal, true, idProject));
                    break;

                case PageListType.DashboardAdministrator:
                    View.SetLinkToDashBoardAsResource(RootObject.DashboardFromCookies(cContext, idCommunity, PageListType.DashboardManager, idProject));
                    View.SetLinkToProjectsAsResource(RootObject.ProjectListManager(cContext.IdCommunity, cContext.isForPortal, cContext.isPersonal, false, idProject, ItemsGroupBy.Plain, View.PreloadFilterBy, View.PreloadFilterStatus, View.PreloadTimeLine, View.PreloadDisplay));
                    break;

                case PageListType.ListAdministrator:
                    View.SetLinkToProjectsAsResource(RootObject.ProjectListManager(cContext.IdCommunity, cContext.isForPortal, cContext.isPersonal, false, idProject, ItemsGroupBy.Plain, View.PreloadFilterBy, View.PreloadFilterStatus, View.PreloadTimeLine, View.PreloadDisplay));
                    break;
                }
                break;

            case TabListItem.Resource:
                switch (fromPage)
                {
                case PageListType.DashboardResource:
                    View.SetLinkToDashBoardAsResource(RootObject.DashboardFromCookies(cContext, idCommunity, PageListType.DashboardResource, idProject));
                    View.SetLinkToProjectsAsResource(RootObject.ProjectListResource(cContext.IdCommunity, cContext.isForPortal, cContext.isPersonal, false, idProject, ItemsGroupBy.Plain, View.PreloadFilterBy, View.PreloadFilterStatus, View.PreloadTimeLine, View.PreloadDisplay));
                    break;

                case PageListType.ListResource:
                    View.SetLinkToProjectsAsResource(RootObject.ProjectListResource(idCommunity, cContext.isForPortal, cContext.isPersonal, true, idProject));
                    break;

                case PageListType.DashboardManager:
                    View.SetLinkToDashBoardAsResource(RootObject.DashboardFromCookies(cContext, idCommunity, PageListType.DashboardManager, idProject));
                    View.SetLinkToProjectsAsResource(RootObject.ProjectListManager(cContext.IdCommunity, cContext.isForPortal, cContext.isPersonal, false, idProject, ItemsGroupBy.Plain, View.PreloadFilterBy, View.PreloadFilterStatus, View.PreloadTimeLine, View.PreloadDisplay));
                    break;

                case PageListType.ListManager:
                    View.SetLinkToProjectsAsResource(RootObject.ProjectListManager(cContext.IdCommunity, cContext.isForPortal, cContext.isPersonal, false, idProject, ItemsGroupBy.Plain, View.PreloadFilterBy, View.PreloadFilterStatus, View.PreloadTimeLine, View.PreloadDisplay));
                    break;

                case PageListType.DashboardAdministrator:
                    View.SetLinkToDashBoardAsResource(RootObject.DashboardFromCookies(cContext, idCommunity, PageListType.DashboardManager, idProject));
                    View.SetLinkToProjectsAsResource(RootObject.ProjectListManager(cContext.IdCommunity, cContext.isForPortal, cContext.isPersonal, false, idProject, ItemsGroupBy.Plain, View.PreloadFilterBy, View.PreloadFilterStatus, View.PreloadTimeLine, View.PreloadDisplay));
                    break;

                case PageListType.ListAdministrator:
                    View.SetLinkToProjectsAsResource(RootObject.ProjectListResource(cContext.IdCommunity, cContext.isForPortal, cContext.isPersonal, false, idProject, ItemsGroupBy.Plain, View.PreloadFilterBy, View.PreloadFilterStatus, View.PreloadTimeLine, View.PreloadDisplay));
                    break;
                }
                break;
            }
        }