Beispiel #1
0
        public IActionResult ProductList()
        {
            var products         = _productService.GetAllProducts();
            var productListModel = _productModelFactory.PrepareProductListModel(products);

            return(View(productListModel));
        }
Beispiel #2
0
        /// <summary>
        /// 获取所属书籍
        /// </summary>
        /// <param name="searchModel"></param>
        /// <returns></returns>
        public IActionResult GetBooksByCategory(BookDirSearchModel searchModel)
        {
            var result = _productModelFactory.PrepareProductListModel(
                new Models.Catalog.ProductSearchModel()
            {
                SearchCategoryId = searchModel.CategoryID
            });

            return(Json(result.Data.ToList()));
        }
        public virtual IActionResult ProductList(ProductSearchModel searchModel)
        {
            if (!_permissionService.Authorize(StandardPermissionProvider.ManageProducts))
            {
                return(AccessDeniedKendoGridJson());
            }

            //prepare model
            var model = _productModelFactory.PrepareProductListModel(searchModel);

            return(Json(model));
        }