public ActionResult List(DataSourceRequest command, CataloguesListModel model) { if (!_permissionService.Authorize(StandardPermissionProvider.ManageCatalogues)) return AccessDeniedView(); var catalogues = _cataloguesService.GetAllCatalogues(model.SearchCataloguesName, command.Page - 1, command.PageSize, true); var catalogues1 = _cataloguesService.GetAllCatalogues("", command.Page - 1, command.PageSize, true); var gridModel = new DataSourceResult { Data = catalogues.Select(x => { var cataloguesModel = x.ToModel(); cataloguesModel.Breadcrumb = x.GetFormattedBreadCrumb(_cataloguesService); return cataloguesModel; }), Total = catalogues.TotalCount }; return Json(gridModel); }
public ActionResult List() { if (!_permissionService.Authorize(StandardPermissionProvider.ManageCatalogues)) return AccessDeniedView(); var model = new CataloguesListModel(); return View(model); }