Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        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));
        }
Ejemplo n.º 3
0
        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));
        }