Torna al Thread

namespace MioProgetto.DBObject { public class Categorie : DBConnector { private List<CategorieItem> _Items = new List<CategorieItem>(); /// <summary> /// Elenca tutt i record /// </summary> public List<CategorieItem> List() { using (SqlCommand objCmd = new SqlCommand("LA TUA SELECT O STORED PROCEDURE", this.OpenConnection())) { objCmd.CommandType = CommandType.StoredProcedure; // Eventuali parametri da aggiungere SqlDataReader objDR = objCmd.ExecuteReader(); while (objDR.Read()) { CategorieItem ci = new CategorieItem(); ci.IDCategoria = Convert.ToInt32(objDR["IDCategoria"]); // ************************************************************************************ // INTERVENIRE QUI PER L'HTML DECODE!!! // ************************************************************************************ ci.Categoria = objDR["Categoria"].ToString(); this._Items.Add(ci); } this.CloseConnection(); if (this._Items != null && this._Items.Count > 0) { return this._Items; } else { return null; } } } } }
Copyright © dotNetHell.it 2002-2025
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5