// GET: Banner public ActionResult Banner() { //banner var pager = PageReq.Create(); var banners = jlService.Banners(); var bannerVo = banners.OrderBy(b => b.SortIndex); return(PartialView(bannerVo)); }
public void InitializeCategories(ViewDataDictionary viewData, int?category, string key = null) { var pager = PageReq.Create(); var categories = jlService.ProductCategoryPage(pager); if (categories != null) { viewData[key ?? "categories"] = new SelectList(categories.Data, "AutoId", "Name", category); } }
// GET: Material public ActionResult Index(int page = 1) { MaterialFilter filter = new MaterialFilter(); var pager = PageReq <MaterialFilter> .Create(filter, page); var data = jlService.MaterialPage(pager); return(View(data)); }
// GET: backend/Banner public ActionResult Index() { var pager = PageReq.Create(); // search page var data = jlService.BannerPage(pager); ViewBag.ReturnUrl = Request.Url.PathAndQuery; return(View(data)); }
public ActionResult Video(int page = 1) { MaterialFilter filter = new MaterialFilter(); filter.MaterialType = (int)MaterialType.Video; PageReq <MaterialFilter> pager = PageReq <MaterialFilter> .Create(filter, page); var data = jlService.MaterialPage(pager); return(View(data)); }
// GET: SkinCare/page-1 public ActionResult Page(int page = 1) { ArticleFilter af = new ArticleFilter(); af.Status = Consts.ArticleStatus_Published; var pager = PageReq <ArticleFilter> .Create(af, page, 10); var article = jlService.ArticlePage(pager); return(View(article)); }
// GET: backend/Member public ActionResult Index(MemberSearchModel searchTo, int page = 0) { var filter = new JL.Core.Filters.MemberFilter(); filter.NickName = searchTo.NickName; filter.JoinTimeFrom = searchTo.JoinTimeFrom; filter.JoinTimeTo = searchTo.JoinTimeTo; var pager = PageReq <JL.Core.Filters.MemberFilter> .Create(filter, page); // search page var data = jlService.MemberPage(pager); ViewBag.productQuery = searchTo; return(View(data)); }
public ActionResult Video(MaterialSearchModel model, int page = 1) { MaterialFilter filter = new MaterialFilter(); filter.AddTimeFrom = model.AddTimeFrom; filter.AddTimeTo = model.AddTimeTo; filter.MaterialType = (int)MaterialType.Video; filter.Title = model.Title; PageReq <MaterialFilter> pager = PageReq <MaterialFilter> .Create(filter, page); var data = jlService.MaterialPage(pager); return(View(data)); }
// GET: backend/Article public ActionResult Index(ArticleSearchModel model, int page = 1) { ArticleFilter filter = new ArticleFilter(); filter.Title = model.Title; filter.Status = Consts.ArticleStatus_All; var pager = PageReq <ArticleFilter> .Create(filter, page); pager.OrderBy = "order by addtime"; var data = jlService.ArticlePage(pager); ViewBag.articleQuery = filter; ViewBag.ReturnUrl = Request.Url.PathAndQuery; return(View(data)); }
// GET: backend/Product public ActionResult Index(ProductSearchModel searchTo, int page = 0) { var filter = new JL.Core.Filters.ProductFilter(); filter.CategoryId = searchTo.CategoryId; filter.Title = searchTo.Title; var pager = PageReq <JL.Core.Filters.ProductFilter> .Create(filter, page); // search page var data = jlService.ProductPage(pager); new ViewDataHelper(jlService).InitializeCategories(ViewData, 0, "categoryid"); ViewBag.productQuery = searchTo; ViewBag.ReturnUrl = Request.Url.PathAndQuery; return(View(data)); }
// GET: Product public ActionResult Detail(int id = 0) { // category PageReq pager = new PageReq(); var categoryData = jlService.ProductCategoryPage(pager); ViewBag.Categories = categoryData; if (id < 1) { var page = PageReq.Create(); var products = jlService.ProductPage(page); var p = products.Data.FirstOrDefault(); return(View(p)); } var product = jlService.GetProduct(id); return(View(product)); }
public ActionResult Index() { // 新品推荐 var recommendProducts = jlService.GetProductsRecommends(); ViewBag.RecommendProducts = recommendProducts; // 产品中心 ProductFilter filter = new ProductFilter(); filter.Status = 0; var productCenter = jlService.ProductPage(PageReq <ProductFilter> .Create(filter, pageSize: 6)); ViewBag.ProductCenter = productCenter.Data; // 套装系列 var pager = PageReq.Create(pageSize: 5); jlService.ProductCategoryPage(pager); // members MemberFilter mf = new MemberFilter(); var members = jlService.MemberPage(PageReq <MemberFilter> .Create(mf, pageSize: 5)); ViewBag.Members = members.Data; // 资讯中心 ArticleFilter af = new ArticleFilter(); af.Status = Consts.ArticleStatus_Published; var articlePager = PageReq <ArticleFilter> .Create(af, pageSize : 8); articlePager.OrderBy = " order by addtime desc "; var articles = jlService.ArticlePage(articlePager); ViewBag.Articles = articles.Data; return(View()); }