public StoreHomePage GetHomePage() { int page = 1; StoreHomePage resultModel = new StoreHomePage(); resultModel.SStore = MyStore; resultModel.SCarouselImages = FileManagerRepository.GetStoreCarousels(MyStore.Id); resultModel.SProductCategories = ProductCategoryRepository.GetProductCategoriesByStoreId(MyStore.Id); var products = ProductRepository.GetProductsCategoryId(MyStore.Id, null, StoreConstants.ProductType, true, page, 24); resultModel.SProducts = new PagedList <Product>(products.items, products.page - 1, products.pageSize, products.totalItemCount); var contents = ContentRepository.GetContentsCategoryId(MyStore.Id, null, StoreConstants.NewsType, true, page, 24); resultModel.SNews = new PagedList <Content>(contents.items, contents.page - 1, contents.pageSize, contents.totalItemCount); contents = ContentRepository.GetContentsCategoryId(MyStore.Id, null, StoreConstants.BlogsType, true, page, 24); resultModel.SBlogs = new PagedList <Content>(contents.items, contents.page - 1, contents.pageSize, contents.totalItemCount); resultModel.SBlogsCategories = CategoryRepository.GetCategoriesByStoreId(MyStore.Id, StoreConstants.BlogsType, true); resultModel.SNewsCategories = CategoryRepository.GetCategoriesByStoreId(MyStore.Id, StoreConstants.NewsType, true); resultModel.SNavigations = NavigationRepository.GetStoreActiveNavigations(this.MyStore.Id); resultModel.SSettings = this.GetStoreSettings(); return(resultModel); }
public List <FileManager> GetStoreCarousels(int storeId) { return(FileManagerRepository.GetStoreCarousels(storeId)); }