public ActionResult GetProducts(int categoryId, string categoryName, int subCategoryId, string subCategoryName) { ViewBag.CategoryName = categoryName; ViewBag.CategoryId = categoryId; ViewBag.SubCategoryName = subCategoryName; ViewBag.SubCategoryId = subCategoryId; return(View(objProductBO.GetProducts(categoryId, subCategoryId))); }
// GET: /Admin/Product/ public ActionResult Index() { ViewBag.Category = new SelectList(objCategoryBO.GetCategories(true), "PKCategoryId", "CategoryName"); ViewBag.SubCategory = new SelectList(objSubCategoryBO.GetSubCategories(0, true), "PKSubCategoryId", "SubCategoryName"); return(View(objProductBO.GetProducts())); }