public IActionResult CategoryList() { var categories = _categoryService.GetAllCategories(); var categoryListModel = _categoryModelFactory.PrepareCategoryListModel(categories); return(View(categoryListModel)); }
public virtual IActionResult List(CategorySearchModel searchModel) { if (!_permissionService.Authorize(StandardPermissionProvider.ManageCategories)) { return(AccessDeniedKendoGridJson()); } //prepare model var model = _categoryModelFactory.PrepareCategoryListModel(searchModel); return(Json(model)); }
public virtual IActionResult List(CategorySearchModel searchModel) { bool isAuthorized = _authorizationService.AuthorizeAsync(User, GetCurrentUserAsync(), CustomerOperations.Read).Result.Succeeded; if (!isAuthorized) { return(AccessDeniedView()); } //prepare model CategoryListModel model = _categoryModelFactory.PrepareCategoryListModel(searchModel); return(Json(model)); }