Пример #1
0
        public ActionResult RenderMyProjects()
        {
            var nodeListingProvider = new NodeListingProvider();
            var memberId            = Members.GetCurrentMemberId();

            var myProjects      = nodeListingProvider.GetListingsByVendor(memberId, false, true).OrderBy(x => x.Name);
            var contribProjects = nodeListingProvider.GetListingsForContributor(memberId).OrderBy(x => x.Name);
            var model           = new MyProjectsModel
            {
                Projects        = myProjects,
                ContribProjects = contribProjects
            };

            return(PartialView("~/Views/Partials/Projects/MyProjects.cshtml", model));
        }
Пример #2
0
        public ActionResult RenderMyProjects()
        {
            var nodeListingProvider = new NodeListingProvider();
            var memberId            = Members.GetCurrentMemberId();

            var myProjects      = nodeListingProvider.GetListingsByVendor(memberId, false, true).OrderBy(x => x.Name);
            var contribProjects = nodeListingProvider.GetListingsForContributor(memberId).OrderBy(x => x.Name);

            var model = new MyProjectsModel
            {
                MyLiveProjects         = myProjects.Where(project => project.Live && !project.IsRetired),
                MyRetiredProjects      = myProjects.Where(project => project.Live && project.IsRetired),
                MyDraftProjects        = myProjects.Where(project => !project.Live),
                ContribLiveProjects    = contribProjects.Where(project => project.Live && !project.IsRetired),
                ContribRetiredProjects = contribProjects.Where(project => project.Live && project.IsRetired),
                ContribDraftProjects   = contribProjects.Where(project => !project.Live),
            };

            return(PartialView("~/Views/Partials/Projects/MyProjects.cshtml", model));
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            editUrl    = umbraco.library.NiceUrl(edit);
            forumUrl   = umbraco.library.NiceUrl(forum);
            licenseUrl = umbraco.library.NiceUrl(licenses);
            teamUrl    = umbraco.library.NiceUrl(team);

            var nodeListingProvider = new NodeListingProvider();
            var memberId            = Members.GetCurrentMemberId();

            var projects = nodeListingProvider.GetListingsByVendor(memberId, true, true).OrderBy(x => x.Name);

            myProjects.DataSource = projects;
            myProjects.DataBind();

            var contribProjects = nodeListingProvider.GetListingsForContributor(memberId);

            myTeamProjects.DataSource = contribProjects;
            myTeamProjects.DataBind();
        }