Exemplo n.º 1
0
 public void PrefilterModel(IWebPages vm)
 {
     if (vm != null && vm.WebPages != null && vm.WebPages.Count > 0)
     {
         vm.WebPages = vm.WebPages.Where(IsFilled).ToList();
     }
 }
Exemplo n.º 2
0
        protected string GetLayout(tbl_Content content, IWebPages WebPagesService)
        {
            string layoutDir = DEFAULT_LAYOUT_LOCATION;

            if (!string.IsNullOrEmpty(ViewBag.Theme) && System.IO.File.Exists(Server.MapPath(String.Format("/Themes/{0}{1}", ViewBag.Theme, DEFAULT_LAYOUT_LOCATION))))
            {
                layoutDir = String.Format("/Themes/{0}{1}", ViewBag.Theme, DEFAULT_LAYOUT_LOCATION);
            }

            if (content.tbl_SiteMap.SM_CustomLayoutID != null)
            {
                var customLayout = WebPagesService.GetCustomLayoutById((int)content.tbl_SiteMap.SM_CustomLayoutID);

                if (!string.IsNullOrEmpty(ViewBag.Theme) && System.IO.File.Exists(Server.MapPath(String.Format("/Themes/{0}{1}", ViewBag.Theme, customLayout.CL_Directory))))
                {
                    layoutDir = String.Format("/Themes/{0}{1}", ViewBag.Theme, customLayout.CL_Directory);
                }
            }

            return(layoutDir);
        }
Exemplo n.º 3
0
 public AdmnController(IUser userService,
     IDomain domainService,
     IWebContent webContentService,
     IWebPages webPagesService,
     IECommerce ecommerceService,
     IPOI poiService,
     ITemplate templateService,
     IPortfolio portfolioService,
     IGallery galleryService)
     : base(domainService)
 {
     this.UserService = userService;
     this.DomainService = domainService;
     this.WebContentService = webContentService;
     this.WebPagesService = webPagesService;
     this.ECommerceService = ecommerceService;
     this.POIService = poiService;
     this.TemplateService = templateService;
     this.PortfolioService = portfolioService;
     this.GalleryService = galleryService;
 }
Exemplo n.º 4
0
 public ItemPurchaseSD(IWebPages pages) => _pages = pages;
Exemplo n.º 5
0
        protected string GetLayout(tbl_Content content, IWebPages WebPagesService)
        {
            string layoutDir = DEFAULT_LAYOUT_LOCATION;

            if (!string.IsNullOrEmpty(ViewBag.Theme) && System.IO.File.Exists(Server.MapPath(String.Format("/Themes/{0}{1}", ViewBag.Theme, DEFAULT_LAYOUT_LOCATION))))
            {
                layoutDir = String.Format("/Themes/{0}{1}", ViewBag.Theme, DEFAULT_LAYOUT_LOCATION);
            }

            if (content.tbl_SiteMap.SM_CustomLayoutID != null)
            {
                var customLayout = WebPagesService.GetCustomLayoutById((int)content.tbl_SiteMap.SM_CustomLayoutID);

                if (!string.IsNullOrEmpty(ViewBag.Theme) && System.IO.File.Exists(Server.MapPath(String.Format("/Themes/{0}{1}", ViewBag.Theme, customLayout.CL_Directory))))
                {
                    layoutDir = String.Format("/Themes/{0}{1}", ViewBag.Theme, customLayout.CL_Directory);
                }

            }

            return layoutDir;
        }
 public ITranslationDefinitions <TIn, ServiceChannelVersioned> AddWebPagesDefinition <TIn>(ITranslationDefinitions <TIn, ServiceChannelVersioned> definition, IWebPages model, Guid?referenceId) where TIn : IWebPages
 {
     model.WebPages?.ForEach(i => i.OwnerReferenceId = referenceId);
     return(definition.AddCollection(i => i.WebPages.Where(j => !string.IsNullOrEmpty(j.UrlAddress)), o => o.WebPages, true));
 }