예제 #1
0
        public PageManageModel(Page page)
        {
            _pageServices = HostContainer.GetInstance <IPageServices>();
            var pageTemplateServices = HostContainer.GetInstance <IPageTemplateServices>();
            var fileTemplateServices = HostContainer.GetInstance <IFileTemplateServices>();
            int position;
            int relativePageId;
            var relativePages = _pageServices.GetRelativePages(out position, out relativePageId, page.Id, page.ParentId);

            Id                      = page.Id;
            Content                 = page.Content;
            Title                   = page.Title;
            FriendlyUrl             = page.FriendlyUrl;
            Caption                 = page.Caption;
            Status                  = page.Status;
            StatusList              = _pageServices.GetStatus();
            ParentId                = page.ParentId;
            Parents                 = _pageServices.GetPossibleParents(page.Id);
            FileTemplateId          = page.FileTemplateId;
            FileTemplates           = fileTemplateServices.GetFileTemplateSelectList(page.FileTemplateId);
            PageTemplateId          = page.PageTemplateId;
            PageTemplates           = pageTemplateServices.GetPageTemplateSelectList(page.PageTemplateId);
            Position                = position;
            Positions               = EnumUtilities.GetSelectListFromEnum <PageEnums.PositionEnums>();
            RelativePageId          = relativePageId;
            RelativePages           = relativePages;
            IncludeInSiteNavigation = page.IncludeInSiteNavigation;
            Tags                    = page.PageTags.Select(t => t.TagId).ToList();
            TagList                 = _pageServices.GetPageTags(page.Id);
            StartPublishingDate     = page.StartPublishingDate;
            EndPublishingDate       = page.EndPublishingDate;
            RecordOrder             = page.RecordOrder;
            RecordActive            = page.RecordActive;
        }
예제 #2
0
        public PageManageModel(Page page)
        {
            _pageServices = HostContainer.GetInstance<IPageServices>();
            var pageTemplateServices = HostContainer.GetInstance<IPageTemplateServices>();
            var fileTemplateServices = HostContainer.GetInstance<IFileTemplateServices>();
            int position;
            int relativePageId;
            var relativePages = _pageServices.GetRelativePages(out position, out relativePageId, page.Id, page.ParentId);

            Id = page.Id;
            Content = page.Content;
            Title = page.Title;
            FriendlyUrl = page.FriendlyUrl;
            Caption = page.Caption;
            Status = page.Status;
            StatusList = _pageServices.GetStatus();
            ParentId = page.ParentId;
            Parents = _pageServices.GetPossibleParents(page.Id);
            FileTemplateId = page.FileTemplateId;
            FileTemplates = fileTemplateServices.GetFileTemplateSelectList(page.FileTemplateId);
            PageTemplateId = page.PageTemplateId;
            PageTemplates = pageTemplateServices.GetPageTemplateSelectList(page.PageTemplateId);
            Position = position;
            Positions = EnumUtilities.GetSelectListFromEnum<PageEnums.PositionEnums>();
            RelativePageId = relativePageId;
            RelativePages = relativePages;
            IncludeInSiteNavigation = page.IncludeInSiteNavigation;
            Tags = page.PageTags.Select(t => t.TagId).ToList();
            TagList = _pageServices.GetPageTags(page.Id);
            StartPublishingDate = page.StartPublishingDate;
            EndPublishingDate = page.EndPublishingDate;
            RecordOrder = page.RecordOrder;
            RecordActive = page.RecordActive;
        }
예제 #3
0
        public PageManageModel()
        {
            _pageServices = HostContainer.GetInstance<IPageServices>();
            var pageTemplateServices = HostContainer.GetInstance<IPageTemplateServices>();
            var fileTemplateServices = HostContainer.GetInstance<IFileTemplateServices>();

            int position;
            int relativePageId;
            var relativePages = _pageServices.GetRelativePages(out position, out relativePageId);
            StatusList = _pageServices.GetStatus();
            Parents = _pageServices.GetPossibleParents();
            PageTemplates = pageTemplateServices.GetPageTemplateSelectList();
            FileTemplates = fileTemplateServices.GetFileTemplateSelectList();
            Positions = EnumUtilities.GetSelectListFromEnum<PageEnums.PositionEnums>();
            TagList = _pageServices.GetPageTags();
            Position = position;
            RelativePageId = relativePageId;
            RelativePages = relativePages;
            IncludeInSiteNavigation = true;
        }
예제 #4
0
        public PageManageModel()
        {
            _pageServices = HostContainer.GetInstance <IPageServices>();
            var pageTemplateServices = HostContainer.GetInstance <IPageTemplateServices>();
            var fileTemplateServices = HostContainer.GetInstance <IFileTemplateServices>();

            int position;
            int relativePageId;
            var relativePages = _pageServices.GetRelativePages(out position, out relativePageId);

            StatusList              = _pageServices.GetStatus();
            Parents                 = _pageServices.GetPossibleParents();
            PageTemplates           = pageTemplateServices.GetPageTemplateSelectList();
            FileTemplates           = fileTemplateServices.GetFileTemplateSelectList();
            Positions               = EnumUtilities.GetSelectListFromEnum <PageEnums.PositionEnums>();
            TagList                 = _pageServices.GetPageTags();
            Position                = position;
            RelativePageId          = relativePageId;
            RelativePages           = relativePages;
            IncludeInSiteNavigation = true;
        }
예제 #5
0
 public JsonResult GetStatus(int?id)
 {
     return(Json(_pageServices.GetStatus(), JsonRequestBehavior.AllowGet));
 }