Exemple #1
0
        private void ExecuteReprint()
        {
            var invoiceReportParams = _reportParamsMapper.Map(Invoice);

            var reportData = new ReportData
            {
                ReportLocation   = "/Reports/InvoiceReport.rdlc",
                DataSourceName   = "ServicesToProvide",
                DataSourceValue  = Invoice.ServicesToProvide,
                ReportParameters = invoiceReportParams
            };

            _navigationService.ShowWindowAsModal(WindowType.ReportViewerWindow, reportData);
        }
        private void ExecuteConfirmNewInvoice()
        {
            _invoiceService.AddNew(Customer, VehicleToRepair,
                                   ServicesToProvide.ToList());

            Invoice lastIssuedInvoice = _invoiceService.GetLastIssuedInvoice();
            var     reportParams      = _invoiceToReportParamsMapper.Map(lastIssuedInvoice);

            var reportData = new ReportData
            {
                ReportLocation   = "/Reports/InvoiceReport.rdlc",
                DataSourceName   = "ServicesToProvide",
                DataSourceValue  = lastIssuedInvoice.ServicesToProvide,
                ReportParameters = reportParams
            };

            _navigationService.ShowWindowAsModal(WindowType.ReportViewerWindow, reportData);
            base.OnArgumentPassing(new ParameterPassingEventArgs(WindowResult.Success));

            base.OnWindowCloseRequested();
        }