58 lines
1.8 KiB
C#
58 lines
1.8 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.Data;
|
|
|
|
namespace PDFGenerator.BusinessLayer.DataSection
|
|
{
|
|
class DSS133BISPrincipaliProdotti : IDataSection
|
|
{
|
|
#region IDataSection Members
|
|
|
|
public DataSectionResult getDataSection(List<SessionStruct> tabelleSessione, string querySql, DataThread dataThread)
|
|
{
|
|
DataSectionResult dsr = new DataSectionResult();
|
|
DataTable dt = null;
|
|
|
|
dt = SectionManager.GetDataSection(tabelleSessione, querySql, dataThread);
|
|
|
|
dsr.Esito = dt.Rows.Count;
|
|
if (dt.Rows.Count == 0)
|
|
{
|
|
return dsr;
|
|
}
|
|
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);
|
|
|
|
}
|
|
|
|
dsr.Esito = ds133BIS.PrincipaliProdotti.Rows.Count;
|
|
dsr.DatiSezione = ds133BIS;
|
|
|
|
|
|
return dsr;
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|