Ejemplo n.º 1
0
        public ActionResult Detail(int id)
        {
            _productID = id;
            ProductDao pDao = new ProductDao();
            Product    p    = pDao.FindProductByICode(id);

            ProductImageDao           iDao      = new ProductImageDao();
            IQueryable <ProductImage> listImage = iDao.FindImage(id);

            ViewBag.Image = listImage;

            IQueryable <CF_Products_Categories> listCF_P_Cat = pDao.Find_CF_Product_Categories(id);

            ViewBag.CF_Category = listCF_P_Cat;

            ProductDao         pdDao      = new ProductDao();
            List <ViewProduct> listImage2 = pdDao.ListViewProduct(10);

            ViewBag.ViewNewsProduct2 = listImage2;

            CategoryDao           cDao      = new CategoryDao();
            IQueryable <Category> listCates = cDao.ListCategory();

            ViewBag.Category = listCates;

            CommentDao         cmDao       = new CommentDao();
            List <ViewComment> listComment = cmDao.ListComment(id);

            ViewBag.Comment = listComment;

            return(View(p));
        }
Ejemplo n.º 2
0
        public ActionResult Details(int id)
        {
            ProductDao pDao = new ProductDao();
            Product    p    = pDao.FindProductByICode(id);

            ProductImageDao           iDao      = new ProductImageDao();
            IQueryable <ProductImage> listImage = iDao.FindImage(id);

            ViewBag.Image = listImage;

            IQueryable <CF_Products_Categories> listCF_P_Cat = pDao.Find_CF_Product_Categories(id);

            ViewBag.CF_Category = listCF_P_Cat;

            CategoryDao           cDao      = new CategoryDao();
            IQueryable <Category> listCates = cDao.ListCategory();

            ViewBag.Category = listCates;
            return(View(p));
        }