public IActionResult Index() { HomeViewModel homeVm = new HomeViewModel() { }; homeVm.ListHotProduct = _productService.GetHotProduct(8); homeVm.ListNewProduct = _productService.GetNewProduct(8); homeVm.ListPromotionProduct = _productService.GetPromotionProduct(8); homeVm.ListSlide = _slideService.GetAll(false); homeVm.ListAdvertistmentBottom = _advertistmentService.GetbyPageAndPosition(PageName.Home, PositionName.Bottom); homeVm.ListAdvertistmentTop = _advertistmentService.GetbyPageAndPosition(PageName.Home, PositionName.Top); homeVm.ListBlog = _blogService.GetAllForHome(3); homeVm.DomainApi = _config["DomainApi:Domain"]; ViewBag.HomeTitle = _systemConfig.Detail("HomeTitle").Value1; ViewBag.HomeMetaDescription = _systemConfig.Detail("HomeMetaDescription").Value1; ViewBag.HomeMetaKeyword = _systemConfig.Detail("HomeMetaKeyword").Value1; return(View(homeVm)); }
public IActionResult Index(string id) { ProductTagIndexViewModel productTag = new ProductTagIndexViewModel() { }; productTag.DomainApi = _config["DomainApi:Domain"]; productTag.Advertistments = _advertistmentService.GetbyPageAndPosition(PageName.Orther, PositionName.Default); productTag.Slides = _slideService.GetAll(true); productTag.ProductTag = _productService.GetTagById(id); productTag.Tags = _productService.GetAllTag(15); return(View(productTag)); }
public IActionResult Index(int id) { BlogDetailIndexViewModel blogDetail = new BlogDetailIndexViewModel() { }; blogDetail.Bog = _blogService.GetById(id); blogDetail.TagsForBlogDetail = _blogService.GetTagByBlogId(id); blogDetail.DomainApi = _config["DomainApi:Domain"]; blogDetail.Tags = _blogService.GetTagBlogTop(15); blogDetail.Advertistments = _advertistmentService.GetbyPageAndPosition(PageName.Orther, PositionName.Default); return(View(blogDetail)); }
public IActionResult Index() { ProductPromotionIndexViewModel promotion = new ProductPromotionIndexViewModel() { }; promotion.Slides = _slideService.GetAll(true); promotion.Advertistments = _advertistmentService.GetbyPageAndPosition(PageName.Orther, PositionName.Default); promotion.DomainApi = _config["DomainApi:Domain"]; promotion.Tags = _productService.GetAllTag(15); promotion.ProductCategorys = _productService.GetListCategoryHasPromotion(); return(View(promotion)); }
public IActionResult Index(int id) { ProductIndexViewModel product = new ProductIndexViewModel() { }; product.ProductCategory = _productCategoryService.GetById(id); product.Slides = _slideService.GetAll(true); product.Advertistments = _advertistmentService.GetbyPageAndPosition(PageName.Orther, PositionName.Default); product.Tags = _productService.GetAllTag(15); product.DomainApi = _config["DomainApi:Domain"]; return(View(product)); }
public IActionResult Index(string id, int page = 1, int pageSize = 3) { BlogTagIndexViewModel blogTagIndex = new BlogTagIndexViewModel() { }; blogTagIndex.ResultPagging.Items = _blogService.GetBlogByTagPagging(id, page, pageSize, out int totalRows); blogTagIndex.ResultPagging.PageIndex = page; blogTagIndex.ResultPagging.PageSize = pageSize; blogTagIndex.ResultPagging.TotalRows = totalRows; blogTagIndex.DomainApi = _config["DomainApi:Domain"]; blogTagIndex.Tags = _blogService.GetTagBlogTop(15); blogTagIndex.Advertistments = _advertistmentService.GetbyPageAndPosition(PageName.Orther, PositionName.Default); return(View(blogTagIndex)); }