public ActionResult ProductDetail(int productID)
 {
     ViewBag.Product     = ProductAPIController.GetProductByID(productID);
     ViewBag.Comment     = CommentAPIController.GetComment(ViewBag.Product.ProductID);
     ViewBag.QuantityBuy = 1;
     return(View());
 }
示例#2
0
 public ActionResult ProductAdmin(int productID)
 {
     if (productID == 0)
     {
         ViewBag.Product = new Product();
     }
     else
     {
         ViewBag.Product = ProductAPIController.GetProductByID(productID);
     }
     ViewBag.ImageURL     = "~/images/" + ViewBag.Product.ImageName;
     ViewBag.CategoryList = CategoryAPIController.getAllCategoryAdmin();
     return(View());
 }