public SummedReportCalculator(IDataConverter dataConverter, IFullReportCalculator fullReportCalculator)
 {
     _dataConverter        = dataConverter;
     _fullReportCalculator = fullReportCalculator;
 }
示例#2
0
        public SdmForm(FullExportMenu fullExportMenu,
                       SummedExportMenu summedExportMenu,
                       ImportCenturionForm importCenturionForm,
                       ImportClientForm importClientForm,
                       ImportLatencyForm importLatencyForm, IFullReportCalculator fullReportCalculator, ISummedReportCalculator summedReportCalculator, IReportsDal reportsDal, IIssuesReportCalculator issuesReportCalculator)
        {
            _fullExportMenu         = fullExportMenu;
            _summedExportMenu       = summedExportMenu;
            _importCenturionForm    = importCenturionForm;
            _importClientForm       = importClientForm;
            _importLatencyForm      = importLatencyForm;
            _fullReportCalculator   = fullReportCalculator;
            _summedReportCalculator = summedReportCalculator;
            _reportsDal             = reportsDal;
            _issuesReportCalculator = issuesReportCalculator;

            InitializeComponent();

            ExportMenuPanel.SuspendLayout();
            ImportPanel.SuspendLayout();

            _exportOptionsBindingSource.DataSource = new List <string> {
                "Full Report", "Summed Report"
            };
            ExportTypeComboBox.DataSource = _exportOptionsBindingSource;

            _importOptionsBindingSource.DataSource = new List <string> {
                "Centurion Report", "Client Report", "Latency Conversion"
            };
            ImportTypeComboBox.DataSource = _importOptionsBindingSource;

            ExportMenuPanel.Controls.Add(_fullExportMenu);
            ExportMenuPanel.Controls.Add(_summedExportMenu);

            ImportPanel.Controls.Add(_importCenturionForm);
            ImportPanel.Controls.Add(_importClientForm);
            ImportPanel.Controls.Add(_importLatencyForm);

            UpdateImportPanel();
            UpdateExportMenuForm();

            _summedExportMenu.summedTablesComboBox.SelectedIndexChanged += this.ChangedChosenSummedReport;
            _importCenturionForm.updateUsagesButton.Click += (s, e) =>
            {
                GetUpdatedReport();
                UpdateExcelContentPanel();
            };
            _importClientForm.updateUsagesButton.Click += (s, e) =>
            {
                GetUpdatedReport();
                UpdateExcelContentPanel();
            };
            _importLatencyForm.updateUsagesButton.Click += (s, e) =>
            {
                GetUpdatedReport();
                UpdateExcelContentPanel();
            };
            _fullExportMenu.ExportFullReportButton.Click     += this.ExportSinlgeReport;
            _summedExportMenu.exportSummedReportButton.Click += this.ExportSinlgeReport;
            _summedExportMenu.exportAllReports.Click         += this.ExportAllSummedReports;

            ExcelContentPanel.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.None;

            _fullExportMenu.ExportIssuesButton.Click   += (s, e) => ExportIssuesReport();
            _summedExportMenu.ExportIssuesButton.Click += (s, e) => ExportIssuesReport();
        }