using System; using System.Web; //using System.Web.Services; //using System.Web.Services.Protocols; using System.Text; using System.Data; using System.Collections; using PDFGenerator.BusinessLayer.DataSection; using PDFGenerator.BusinessLayer; using System.Collections.Generic; public class DSS156AltroPatrimonio : IDataSection { #region IDataSection Members public StructColor toBeFound = new StructColor(); public DataSectionResult getDataSection(List tabelleSessione, string querySql, DataThread dataThread) { DataSectionResult dsr = new DataSectionResult(); DataTable dt = SectionManager.GetDataSection(tabelleSessione, querySql, dataThread); Decimal ctvTotale = 0; DataSetS156 ds156 = new DataSetS156(); ds156.Patrimonio.Columns["Valore"].Caption = "Controvalore
€        "; DataRow dr; foreach (DataRow row in dt.Rows) { dr = ds156.Patrimonio.NewRow(); dr["Denominazione"] = row["DENOMINAZIONE"]; dr["Quote"] = row["NUMEROQUOTE"]; dr["Valore"] = row["VALORE"]; ctvTotale += (Decimal)dr["Valore"]; ds156.Patrimonio.Rows.Add(dr); } if (dt.Rows.Count > 0) { DataRow drTot = ds156.TotalePatrimonio.NewRow(); drTot["Descrizione"] = "TOTALE"; drTot["Valore"] = dt.Rows[0]["TOTALE"]; ds156.TotalePatrimonio.Rows.Add(drTot); } dsr.DatiSezione = ds156; dsr.Esito = ds156.Patrimonio.Rows.Count; return dsr; } #endregion }