Example #1
0
        //[HttpGet]
        public ActionResult Brand()
        {
            PerfumeIndexView x = new PerfumeIndexView();

            x.nhanhieu = db.brand;
            return(PartialView(x));
        }
Example #2
0
        public ActionResult ViewBrand(int?id, int?page)
        {
            PerfumeIndexView viewperfume = new PerfumeIndexView();

            viewperfume.recomend_products = new List <perfume>();
            Predict(viewperfume.recomend_products);
            viewperfume.products = db.perfume.Where(p => p.id_brand == id).OrderByDescending(p => p.id_brand).ToPagedList(page ?? 1, 8);
            return(View("Index", viewperfume));
        }
Example #3
0
        public ActionResult Index(int?page)
        {
            //List<perfume> reccomend_product = new List<perfume>();
            AvgProduct();
            CorrelItem();
            PerfumeIndexView perfume = new PerfumeIndexView();

            perfume.recomend_products = new List <perfume>();
            Predict(perfume.recomend_products);
            perfume.products = db.perfume.OrderByDescending(p => p.id).ToPagedList(page ?? 1, 8);
            return(View(perfume));
        }
Example #4
0
        public ActionResult Index(int?page)
        {
            //List<perfume> reccomend_product = new List<perfume>();
            AvgProduct();
            PerfumeIndexView perfume = new PerfumeIndexView();

            perfume.recomend_products = new List <perfume>();
            Predict(perfume.recomend_products);
            perfume.products = db.perfume.OrderByDescending(p => p.id).ToPagedList(page ?? 1, 8);
            perfume.gettop   = db.perfume.OrderByDescending(p => p.num_of_sale).Take(6).ToList();
            perfume.new_pro  = db.perfume.OrderByDescending(p => p.id).Take(6).ToList();
            return(View(perfume));
        }