Пример #1
0
        // ------------------ filter product type by category -----------
        public ActionResult FilterProductTypeByCategory(int?id)  // id = category ID
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            ViewBag.category = context.Category.Find(id);
            IEnumerable <ProductType> filteredTypes = DAL.FilterProductTypeByCategory(id);

            return(View(filteredTypes));
        }