Files
medpred/MedPred_Data/DtProxy.cs
T
2014-05-06 18:33:39 +02:00

60 lines
2.0 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SteamWare;
namespace MedPred_Data
{
public class DtProxy
{
#region area protected
protected DtProxy()
{
// inizializzo i table adapters
avvioTableAdapters();
setupConnectionString();
}
/// <summary>
/// procedura di avvio dei tableAdapter
/// </summary>
protected virtual void avvioTableAdapters()
{
taAP = new DS_ApplicazioneTableAdapters.AnagPazientiTableAdapter();
taVGen = new DS_ApplicazioneTableAdapters.VisGenTableAdapter();
taVCardio = new DS_ApplicazioneTableAdapters.VisCardioTableAdapter();
taVLab = new DS_ApplicazioneTableAdapters.VisLabTableAdapter();
taVCiclo = new DS_ApplicazioneTableAdapters.VisCicloTableAdapter();
}
/// <summary>
/// effettua setup dei connection strings da web.config della singola applicazione
/// </summary>
protected virtual void setupConnectionString()
{
string connStr = memLayer.ML.confReadString("MedPredConnectionString");
// connections del db vocabolario
taAP.Connection.ConnectionString = connStr;
taVGen.Connection.ConnectionString = connStr;
taVCardio.Connection.ConnectionString = connStr;
taVLab.Connection.ConnectionString = connStr;
taVCiclo.Connection.ConnectionString = connStr;
}
#endregion
#region area public
public DS_ApplicazioneTableAdapters.AnagPazientiTableAdapter taAP;
public DS_ApplicazioneTableAdapters.VisGenTableAdapter taVGen;
public DS_ApplicazioneTableAdapters.VisCardioTableAdapter taVCardio;
public DS_ApplicazioneTableAdapters.VisLabTableAdapter taVLab;
public DS_ApplicazioneTableAdapters.VisCicloTableAdapter taVCiclo;
public static DtProxy man = new DtProxy();
#endregion
}
}