Files
Samuele E. Locatelli a2ae36afb7 update report e stored...
2014-09-17 10:08:37 +02:00

68 lines
2.5 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();
taVAC = new DS_ApplicazioneTableAdapters.VisAnamCliTableAdapter();
taVCP = new DS_ApplicazioneTableAdapters.VisCardioPolTableAdapter();
taVLab = new DS_ApplicazioneTableAdapters.VisLabTableAdapter();
taVRF = new DS_ApplicazioneTableAdapters.VisRelazFinTableAdapter();
taRepVis = new DS_ApplicazioneTableAdapters.stp_rep_DatiFullByPazienteDataTableAdapter();
taFile = new DS_UtilityTableAdapters.tblFilesTableAdapter();
}
/// <summary>
/// effettua setup dei connection strings da web.config della singola applicazione
/// </summary>
protected virtual void setupConnectionString()
{
string connStr = memLayer.ML.confReadString("MedPredConnectionString");
string connStrFiles = memLayer.ML.confReadString("MedPredFilesConnectionString");
// connections del db vocabolario
taAP.Connection.ConnectionString = connStr;
taVAC.Connection.ConnectionString = connStr;
taVCP.Connection.ConnectionString = connStr;
taVLab.Connection.ConnectionString = connStr;
taVRF.Connection.ConnectionString = connStr;
taRepVis.Connection.ConnectionString = connStr;
taFile.Connection.ConnectionString = connStrFiles;
}
#endregion
#region area public
public DS_ApplicazioneTableAdapters.AnagPazientiTableAdapter taAP;
public DS_ApplicazioneTableAdapters.VisAnamCliTableAdapter taVAC;
public DS_ApplicazioneTableAdapters.VisCardioPolTableAdapter taVCP;
public DS_ApplicazioneTableAdapters.VisLabTableAdapter taVLab;
public DS_ApplicazioneTableAdapters.VisRelazFinTableAdapter taVRF;
public DS_ApplicazioneTableAdapters.stp_rep_DatiFullByPazienteDataTableAdapter taRepVis;
public DS_UtilityTableAdapters.tblFilesTableAdapter taFile;
public static DtProxy man = new DtProxy();
#endregion
}
}