public ActionResult _Files( string tabId, int parentId, int gridParentId, int page, int pageSize, string orderBy, [ModelBinder(typeof(JsonStringModelBinder <LibraryFileFilter>))] LibraryFileFilter searchQuery) { var listCommand = GetListCommand(page, pageSize, orderBy); var serviceResult = ContentService.GetFileList(listCommand, gridParentId, searchQuery); return(new TelerikResult(serviceResult.Data, serviceResult.TotalRecords)); }
public ActionResult _Files(GridCommand command, int gridParentId, [ModelBinder(typeof(JsonStringModelBinder <LibraryFileFilter>))] LibraryFileFilter searchQuery) { var serviceResult = ContentService.GetFileList(command.GetListCommand(), gridParentId, searchQuery); return(new TelerikResult(serviceResult.Data, serviceResult.TotalRecords)); }
public static ListResult <FolderFile> GetFileList(ListCommand command, int parentFolderId, LibraryFileFilter filter) { var factory = new ContentFolderFactory(); var repository = factory.CreateRepository(); var folder = repository.GetById(parentFolderId); if (folder == null) { throw new Exception(string.Format(LibraryStrings.ContentFolderNotExists, parentFolderId)); } return(folder.GetFiles(command, filter)); }