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