Esempio n. 1
0
        private async Task UpdateDataGridViewDocuments(DateTime dataFrom, DateTime dataTo)
        {
            var documents = await _documentsRepository.GetDocumentsByTime(dataFrom, dataTo);

            dataGridViewDocuments.Rows.Clear();
            dataGridViewDocuments.Columns[1].Width = documents.Count > 4 ? 348 : 365;
            foreach (var document in documents)
            {
                dataGridViewDocuments.Rows.Add(new[] {
                    document.Id.ToString(),
                    document.FileName.ToString(),
                    document.FileLink.ToString()
                });
            }
            ClearDataGridViewDocumentsSelection();
        }