Пример #1
0
        private async void ExportReportAsync(object obj)
        {
            var exporterId =
                await _uiService.ChooseAsync(_reportExporters.Select(e => Tuple.Create(e.Id, e.Description)), Resources.TrackReportVm_ExportReportAsync_Select_report_format);

            if (null == exporterId)
            {
                return;
            }

            var exporter = _reportExporters.FirstOrDefault(re => re.Id == exporterId);

            if (null == exporter)
            {
                await _uiService.NofityError(string.Format(Resources.TrackReportVm_ExportReportAsync_Err_Report_exporter_with_ID__0__unknown, exporterId));

                return;
            }

            await exporter.Export(this);
        }