72 lines
2.7 KiB
C#
72 lines
2.7 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.Data;
|
|
|
|
namespace PDFGenerator.BusinessLayer.DataSection
|
|
{
|
|
class DSS133BISPrincipaliProdotti : IDataSection
|
|
{
|
|
private static NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger();
|
|
|
|
#region IDataSection Members
|
|
|
|
public DataSectionResult getDataSection(List<SessionStruct> tabelleSessione, string querySql, DataThread dataThread)
|
|
{
|
|
/*** TEST - Verifica Tempistica 09/11/2023 - Pino ****/
|
|
/*** Inserimento log per verifica tempistica della sezione ***/
|
|
//DateTimeOffset dateOffsetValueIni = DateTimeOffset.Parse(DateTime.Now.ToString("hh:mm:ss.ffff"));
|
|
/*************************************************************/
|
|
|
|
DataSectionResult dsr = new DataSectionResult();
|
|
DataTable dt = null;
|
|
|
|
dt = SectionManager.GetDataSection(tabelleSessione, querySql, dataThread);
|
|
|
|
if (dt==null || dt.Rows.Count == 0)
|
|
{
|
|
return dsr;
|
|
}
|
|
dsr.Esito = dt.Rows.Count;
|
|
FormatNum num = new FormatNum();
|
|
|
|
|
|
|
|
DataSetS133BIS ds133BIS = new DataSetS133BIS();
|
|
DataSetS133BIS.PrincipaliProdottiRow PrincipaliProdottiRow;
|
|
|
|
for (int i = 0; i < dt.Rows.Count; i++)
|
|
{
|
|
DataRow row = dt.Rows[i];
|
|
|
|
|
|
PrincipaliProdottiRow = ds133BIS.PrincipaliProdotti.NewPrincipaliProdottiRow();
|
|
|
|
PrincipaliProdottiRow.DescrProdotto = row["descrProdotto"].ToString();
|
|
PrincipaliProdottiRow.VaRProdotto = num.ConvertNum(row["VaRprodotto"].ToString());
|
|
PrincipaliProdottiRow.pesoRelativo = num.ConvertNum(row["pesoRelativo"].ToString());
|
|
PrincipaliProdottiRow.rischioRelativo = num.ConvertNum(row["rischioRelativo"].ToString());
|
|
PrincipaliProdottiRow.codiceAreaBisogno = row["codAreaBisogno"].ToString();
|
|
|
|
ds133BIS.PrincipaliProdotti.AddPrincipaliProdottiRow(PrincipaliProdottiRow);
|
|
|
|
}
|
|
|
|
/*** TEST - Verifica Tempistica 09/11/2023 - Pino ****/
|
|
/*** Inserimento log per verifica tempistica della sezione ***/
|
|
//DateTimeOffset dateOffsetValueFin = DateTimeOffset.Parse(DateTime.Now.ToString("hh:mm:ss.ffff"));
|
|
//var tDiff = string.Concat("Tempo di Esecuzione: {0} ", (dateOffsetValueFin - dateOffsetValueIni).ToString());
|
|
//logger.Trace("DSS133BIS " + tDiff);
|
|
/*************************************************************/
|
|
|
|
dsr.Esito = ds133BIS.PrincipaliProdotti.Rows.Count;
|
|
dsr.DatiSezione = ds133BIS;
|
|
|
|
|
|
return dsr;
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|