public ActionResult Contents(string libraryName, string name, string folderPath, string sortField, string sortDir) { try { var contentModel = new ContentModel() { LibraryName = libraryName, Name = name, FolderPath = folderPath, SortDir = sortDir, SortField = sortField }; var content = new Content() { LibraryName = contentModel.LibraryName, Name = contentModel.Name, FolderPath = contentModel.FolderPath, SortDir = contentModel.SortDir, SortField = contentModel.SortField }; var documents = ContentService.GetAllContent(content); var output = documents.Select(model => new ContentModel() { Name = model.Name, Description = model.Description, CreatedDate = model.CreatedDate, CreatedBy = model.CreatedBy, ModifiedDate = model.ModifiedDate, ModifiedBy = model.ModifiedBy }).ToList(); ViewBag.UploadPath = folderPath; ViewBag.LibraryName = libraryName; return View(output); } catch (Exception ex) { throw ex; } }
public bool UploadContent(Content content) { return ContentDao.UploadContent(content); }
public bool DeleteContent(Content content) { throw new NotImplementedException(); }
public List<Content> GetAllContent(Content content) { return ContentDao.GetAllContent(content); }