// GET: Banner
        public ActionResult Banner()
        {
            //banner
            var pager    = PageReq.Create();
            var banners  = jlService.Banners();
            var bannerVo = banners.OrderBy(b => b.SortIndex);

            return(PartialView(bannerVo));
        }
Exemple #2
0
        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);
            }
        }
Exemple #3
0
        // 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));
        }
Exemple #4
0
        // 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));
        }
Exemple #5
0
        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));
        }
Exemple #6
0
        // 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));
        }
Exemple #7
0
        // 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));
        }
Exemple #8
0
        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));
        }
Exemple #9
0
        // 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));
        }
Exemple #10
0
        // 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));
        }
Exemple #11
0
        // 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));
        }
Exemple #12
0
        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());
        }