示例#1
0
        public ClientMenuManageModel()
        {
            _clientMenuServices     = HostContainer.GetInstance <IClientMenuServices>();
            IncludeInSiteNavigation = true;
            Parents = _clientMenuServices.GetPossibleParents();

            int position;
            int relativePageId;
            var relativePages = _clientMenuServices.GetRelativeMenus(out position, out relativePageId);

            Positions      = EnumUtilities.GetSelectListFromEnum <PageEnums.PositionEnums>();
            Position       = position;
            RelativeMenuId = relativePageId;
            RelativeMenus  = relativePages;
        }
示例#2
0
        public ClientMenuManageModel(ClientMenu menu)
        {
            _clientMenuServices = HostContainer.GetInstance <IClientMenuServices>();
            Id   = menu.Id;
            Name = menu.Name;
            Url  = menu.Url;
            IncludeInSiteNavigation = menu.IncludeInSiteNavigation;
            StartPublishingDate     = menu.StartPublishingDate;
            EndPublishingDate       = menu.EndPublishingDate;
            ParentId = menu.ParentId;
            Parents  = _clientMenuServices.GetPossibleParents(menu.Id);

            int position;
            int relativePageId;
            var relativePages = _clientMenuServices.GetRelativeMenus(out position, out relativePageId, menu.Id, menu.ParentId);

            Position       = position;
            Positions      = EnumUtilities.GetSelectListFromEnum <PageEnums.PositionEnums>();
            RelativeMenuId = relativePageId;
            RelativeMenus  = relativePages;
        }
示例#3
0
 public JsonResult GetParents(int?id)
 {
     return(Json(_clientMenuServices.GetPossibleParents(id), JsonRequestBehavior.AllowGet));
 }