Ejemplo n.º 1
0
        public void Export(ISelectionFilter selectionFilter, ITimeEntryFilter timeEntryFilter)
        {
            var entityTransferObject = GetTransferObject(selectionFilter, timeEntryFilter);

            _dataService.ExcelExportCompleted += _dataService_ExcelExportCompleted;
            _dataService.CreateExcelSheet(entityTransferObject);
        }
Ejemplo n.º 2
0
        private ISearchFilterTransferObject GetTransferObject(ISelectionFilter selectionFilter, ITimeEntryFilter timeEntryFilter)
        {
            var entityTransferObject = new SearchFilterTransferObject();

            entityTransferObject.CustomerIds = selectionFilter.Customers.Select(c => c.Id).ToList();
            entityTransferObject.ProjectIds  = selectionFilter.Projects.Select(p => p.Id).ToList();
            entityTransferObject.TaskIds     = selectionFilter.Tasks.Select(t => t.Id).ToList();
            if (timeEntryFilter != null)
            {
                entityTransferObject.Users    = timeEntryFilter.Users.Select(u => u.Id).ToList();
                entityTransferObject.DateFrom = timeEntryFilter.DateFrom;
                entityTransferObject.DateTo   = timeEntryFilter.DateTo;
            }

            return(entityTransferObject);
        }