public ActionResult ProductDetail(int ID)
        {
            var product = ProductBLL.GetProductDetail(ID);

            ViewBag.Category        = ProductCategoryBLL.GetProductDetail(product.CategoryID.Value);
            ViewBag.RelatedProducts = ProductBLL.GetAllRelatedProduct(ID);
            return(View(product));
        }
        public ActionResult Category(int ID, int page = 1, int pageSize = 8)
        {
            int totalRecord = 0;
            int maxPage     = 5;
            int totalPage   = 0;

            var productCategory = ProductCategoryBLL.GetProductDetail(ID);

            ViewBag.ProductCategory = productCategory;
            var products = ProductBLL.GetProductByCategoryID(ID, ref totalRecord, page, pageSize);

            totalPage         = (int)Math.Ceiling((double)(totalRecord / pageSize));
            ViewBag.Total     = totalRecord;
            ViewBag.Page      = page;
            ViewBag.TotalPage = totalPage;
            ViewBag.MaxPage   = maxPage;
            ViewBag.First     = 1;
            ViewBag.Last      = totalPage;
            ViewBag.Next      = page + 1;
            ViewBag.Prev      = page - 1;

            return(View(products));
        }