예제 #1
0
        // GET: ProductDetails
        public ActionResult ProductDetails(int id)
        {
            ProductBLL        bll  = new ProductBLL();
            ProductsPageModel prod = bll.getProductById(id);

            prod.Products   = bll.CommonProductsId(id);
            ViewBag.Message = prod;
            return(View(prod));
        }
        // GET: ProductDetails
        public ActionResult ProductDetails(int id)
        {
            ProductBLL        bll      = new ProductBLL();
            ProductsPageModel prod     = bll.getProductById(id);
            object            myObject = TempData["ListProduts"];

            TempData.Keep();
            List <ProductModel> list = ((IEnumerable)myObject).Cast <ProductModel>().ToList();

            prod.CommonProducts = bll.CommonProductsId(id, list);
            ViewBag.Message     = prod;
            return(View(prod));
        }