コード例 #1
0
        public ClientNavigationManageModel()
        {
            _clientNavigationService = HostContainer.GetInstance <IClientNavigationService>();
            IncludeInSiteNavigation  = true;
            DisableNavigationCascade = false;
            Parents = _clientNavigationService.GetPossibleParents();

            int position;
            int relativePageId;
            var relativePages = _clientNavigationService.GetRelativeNavigations(out position, out relativePageId);

            Positions            = EnumUtilities.GenerateSelectListItems <PageEnums.PagePosition>();
            UrlTargets           = EnumUtilities.GenerateSelectListItems <CommonEnums.UrlTarget>(GenerateEnumType.DescriptionValueAndDescriptionText);
            Position             = position;
            RelativeNavigationId = relativePageId;
            RelativeNavigations  = relativePages;
        }
コード例 #2
0
        public ClientNavigationManageModel(ClientNavigation navigation)
            : this()
        {
            Id        = navigation.Id;
            Title     = navigation.Title;
            Url       = navigation.Url;
            UrlTarget = navigation.UrlTarget;
            IncludeInSiteNavigation  = navigation.IncludeInSiteNavigation;
            DisableNavigationCascade = navigation.DisableNavigationCascade;
            StartPublishingDate      = navigation.StartPublishingDate;
            EndPublishingDate        = navigation.EndPublishingDate;
            ParentId = navigation.ParentId;
            Parents  = _clientNavigationService.GetPossibleParents(navigation.Id);

            int position;
            int relativePageId;
            var relativePages = _clientNavigationService.GetRelativeNavigations(out position, out relativePageId, navigation.Id, navigation.ParentId);

            Position             = position;
            RelativeNavigationId = relativePageId;
            RelativeNavigations  = relativePages;
        }
コード例 #3
0
 public JsonResult GetParents(int?id)
 {
     return(Json(_clientNavigationService.GetPossibleParents(id), JsonRequestBehavior.AllowGet));
 }