From c9ee6c25d5cb8a2406f9c1bfa55d150d3e04954e Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Mon, 17 Feb 2020 10:24:02 +0100 Subject: [PATCH] Fix metodi invio RDS da nuovo traccaito dati con multi-RDS --- NKC_WF/Controllers/PrintQueueConfController.cs | 3 +-- NKC_WF/Controllers/PrintQueueController.cs | 15 +++++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/NKC_WF/Controllers/PrintQueueConfController.cs b/NKC_WF/Controllers/PrintQueueConfController.cs index 1927a39..0f4c971 100644 --- a/NKC_WF/Controllers/PrintQueueConfController.cs +++ b/NKC_WF/Controllers/PrintQueueConfController.cs @@ -53,8 +53,7 @@ namespace NKC_WF.Controllers name = "default", template = "missing.rdlc", printerName = "Microsoft Print to PDF", - deviceInfoParam = currDevInfoParam, - rdsName = "stp_prt_missing" + deviceInfoParam = currDevInfoParam }; answ.Add(currConf); } diff --git a/NKC_WF/Controllers/PrintQueueController.cs b/NKC_WF/Controllers/PrintQueueController.cs index 9ff0c1b..c6f45d0 100644 --- a/NKC_WF/Controllers/PrintQueueController.cs +++ b/NKC_WF/Controllers/PrintQueueController.cs @@ -40,14 +40,15 @@ namespace NKC_WF.Controllers } } /// - /// carica i dati richiesti dal report dalla StoredProcedure (filtrando quindi...) + /// Carica i dati richiesti dal report dalla StoredProcedure (filtrando quindi...) e restituisce Dictionary [nome RDS / tab RDS] /// /// /// cod UDC /// tabella dati - private DataTable caricaDati(reportRichiesto tipoReport, string keyParam) + private Dictionary caricaDati(reportRichiesto tipoReport, string keyParam) { int intIdx = 0; + Dictionary answ = new Dictionary(); DataTable tab = new DataTable(); switch (tipoReport) { @@ -66,15 +67,17 @@ namespace NKC_WF.Controllers case reportRichiesto.partLabel: int.TryParse(keyParam, out intIdx); tab = (DataTable)DataLayer.man.taIL.getByKey(intIdx); + answ.Add("stp_prt_PartLabel", tab); break; case reportRichiesto.stackLabel: int.TryParse(keyParam, out intIdx); tab = (DataTable)DataLayer.man.taRepStack.GetData(intIdx); + answ.Add("stp_prt_StackLabel", tab); break; default: break; } - return tab; + return answ; } @@ -147,16 +150,16 @@ namespace NKC_WF.Controllers if (tabPJQ.Count > 0) { reportData currReport = new reportData(); - DataTable currTab; + Dictionary currRdsData; // ciclo! foreach (var pjReq in tabPJQ) { - currTab = caricaDati(reportByTipo(pjReq.TipoReport), pjReq.KeyParam); + currRdsData = caricaDati(reportByTipo(pjReq.TipoReport), pjReq.KeyParam); // in base alla coda --> recupero i dati currReport = new reportData() { ticketNum = pjReq.IdxPrintJob.ToString(), - rdsTable = currTab + rdsData = currRdsData }; answ.Add(currReport); }