Torna al Thread

using System; using System.Collections.Generic; using System.Text; using System.Data; using System.Configuration; using System.Collections; using DAL; namespace BLL { public class Pannello2 { //Ipotizzando la matricola un intero Dictionary<int, DettaglioPannello2> _elencoDettaglioPannello2 = new Dictionary<int, DettaglioPannello2>(); string mCF ; int mnTA = new int(); public string codiceFiscale { get { return mCF; } set { mCF = value; } } public int numTotAziende { get { return mnTA; } set { mnTA = value; } } public Dictionary<int, DettaglioPannello2> elencoDettaglioPannello2 { get { return _elencoDettaglioPannello2; } } public static DataTable getelencoDettaglioPannello(string codicefiscale) { // get a configured DbCommand object GenericDataAccess gda = new GenericDataAccess(); DbCommand comm = gda.CreateCommand(); comm.CommandType = CommandType.Text; // set the stored procedure name comm.CommandText = "SELECT * FROM Tcampi innerjoin bla bla bla on bla bla bla where @codicefiscale="+ codicefiscale; // create a new parameter DbParameter param = comm.CreateParameter(); param.ParameterName = "@codicefiscale"; param.Value = codicefiscale; param.DbType = DbType.String; comm.Parameters.Add(param); // return the result table DataTable table = gda.ExecuteSelectCommand(comm); return table; } } }
Copyright © dotNetHell.it 2002-2025
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5