Ejemplo n.º 1
0
        public async Task <IActionResult> Detail(int id, DetailTypeSSOT DetailType)

        {
            var Content = await _contentManagementService.Find(id);

            var Gallery = _GalleryService.GetGalleries(id);

            if (Content.SubMenuId.HasValue)
            {
                var menu = await _MenuRepository.Find(Content.SubMenuId.Value);

                TempData["DetailType"] = menu.DetailType;
            }

            //if (DetailType == DetailTypeSSOT.Blog)
            //{
            //    return View("~/Views/Home/Detail.cshtml", new Tuple<ContentEntity, List<Tochal.Core.DomainModels.Entity.Content.Gallery>>(Content, Gallery));
            //}
            if (DetailType == DetailTypeSSOT.Pro)
            {
                return(View("~/Views/Home/PostDetail.cshtml", new Tuple <ContentEntity, List <Tochal.Core.DomainModels.Entity.Content.Gallery> >(Content, Gallery)));
            }
            else
            {
                return(View("~/Views/Home/Text.cshtml", new Tuple <ContentEntity, List <Tochal.Core.DomainModels.Entity.Content.Gallery> >(Content, Gallery)));
            }
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> GetAllImageList(DetailTypeSSOT detailType)
        {
            TempData["PageType"] = detailType;
            var conditions = new ConditionHelper <ContentEntityDTO>();

            conditions.AddCondition(p => p.BlogContentEntityType == BlogContentEntityTypeSSOT.Image);

            var list = await _ContentManagementRepository.GetAll(conditions.GetConditionList());

            return(View("MainView", list));
        }