示例#1
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;
 }
示例#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;
        }