58 lines
2.2 KiB
C#
58 lines
2.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
|
|
namespace PDFGenerator.BusinessLayer.DataSection
|
|
{
|
|
class DSS331AreeBisogno : IDataSection
|
|
{
|
|
public DataSectionResult getDataSection(List<SessionStruct> tabelleSessione, string querySql, DataThread dataThread)
|
|
{
|
|
try
|
|
{
|
|
DataSectionResult dsr = new DataSectionResult();
|
|
DataSetS331 ds331 = new DataSetS331();
|
|
//DataSetS331.ProvaFedericaRow provafedericarow;
|
|
DataSetS331.GraficoPiramideRow graficoPiramiderow;
|
|
|
|
DataTable dt = SectionManager.GetDataSection(tabelleSessione, querySql, dataThread);
|
|
|
|
foreach (DataRow row in dt.Rows)
|
|
{
|
|
//provafedericarow = ds331.ProvaFederica.NewProvaFedericaRow();
|
|
|
|
//provafedericarow.COD_AGENTE = row["COD_AGENTE"].ToString();
|
|
//provafedericarow.COD_FISCALE = row["COD_FISCALE"].ToString();
|
|
//provafedericarow.RETE = row["RETE"].ToString();
|
|
//provafedericarow.CODICECONTRATTO = row["CODICECONTRATTO"].ToString();
|
|
|
|
|
|
//ds331.ProvaFederica.AddProvaFedericaRow(provafedericarow);
|
|
|
|
graficoPiramiderow = ds331.GraficoPiramide.NewGraficoPiramideRow();
|
|
|
|
graficoPiramiderow.areaBisogno = row["AreaName"].ToString();
|
|
graficoPiramiderow.controvalore = row["ControvaloreAttuale"].ToString();
|
|
graficoPiramiderow.controvaloreProtetto = row["ControvaloreProtetto"].ToString();
|
|
graficoPiramiderow.contributoAllaProtezione = row["ContributoProtezione"].ToString();
|
|
|
|
|
|
ds331.GraficoPiramide.AddGraficoPiramideRow(graficoPiramiderow);
|
|
}
|
|
|
|
//ds331.Tables.Add(dt);
|
|
|
|
|
|
dsr.DatiSezione = ds331;
|
|
//dsr.Esito = ds331.ProvaFederica.Rows.Count;
|
|
dsr.Esito = ds331.GraficoPiramide.Rows.Count;
|
|
// dsr.Esito = 1;
|
|
return dsr;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
}
|
|
} |