/// <summary> /// Initializes a new instance of the <see cref="DocumentPreviewForm" /> class. /// </summary> /// <param name="query">The document query to execute.</param> public DocumentPreviewForm(DocumentQuery query) : this() { DocumentCollection documentList = ConfigurationServices.DocumentLibrary.GetDocuments(query); _documentList = new BindingList <Document>(documentList.ToList()); documents_GridView.DataSource = _documentList; }
/// <summary> /// Gets a <see cref="DataTable"/> build from excel export settings. /// </summary> /// <param name="docs">The documents to add.</param> /// <returns>Returns the data table to export.</returns> protected DataTable getMetaDataTable(DocumentCollection docs) { DataTable dt = new DataTable(); exportFields.ToList().ForEach(f => dt.Columns.Add(f)); docs.ToList().ForEach(d => dt.Rows.Add(getRowValues(d, exportFields))); insertLinkColumns(dt, links); return(dt); }