예제 #1
0
        // GET: Product
        public ActionResult Index()
        {
            if (Athurize.CheckNotLogin())
            {
                return(RedirectToAction("Registration", "Home"));
            }
            if (Athurize.CheckUser())
            {
                return(RedirectToAction("Index", "Home"));
            }

            var model    = db.GetAll().ToList();
            var category = catdb.GetAll().ToList();

            ViewBag.category = category;
            var img = imgdb.GetAll().ToList();

            ViewBag.Img = img;
            return(View(model));
        }
예제 #2
0
        public ActionResult Index()
        {
            IEnumerable <ProductMG> model = productMGRepository.GetAll();

            return(View(model));
        }