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 DSS155PatrimonioImmobiliare : 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); dsr.Esito = dt.Rows.Count; DataSetS155 ds155 = new DataSetS155(); DataRow dr; ds155.Patrimonio.Columns["Localita"].Caption = "Località"; ds155.Patrimonio.Columns["Affitti"].Caption += "
€        "; ds155.Patrimonio.Columns["Valore"].Caption += "
€        "; foreach (DataRow row in dt.Rows) { dr = ds155.Patrimonio.NewRow(); dr["Descrizione"] = row["DESCRIZIONE"]; dr["Tipologia"] = row["TIPOLOGIA"]; dr["Localita"] = row["LOCALITA"]; dr["Affitti"] = row["AFFITTOPERCEPITO"]; dr["Valore"] = row["VALORE"]; ds155.Patrimonio.Rows.Add(dr); } if (dt.Rows.Count > 0) { DataRow drTot = ds155.TotalePatrimonio.NewRow(); drTot["Descrizione"] = "TOTALE"; drTot["Valore"] = dt.Rows[0]["TOTALE"]; drTot["TotaleAffitto"] = dt.Rows[0]["TotaleAffitto"]; ds155.TotalePatrimonio.Rows.Add(drTot); } dsr.DatiSezione = ds155; dsr.Esito = ds155.Patrimonio.Rows.Count; return dsr; } #endregion }