Files
2017-03-30 16:23:48 +02:00

71 lines
2.8 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SteamWare;
namespace ScheMe_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();
taP2L = new DS_ApplicazioneTableAdapters.Pazienti2LabelsTableAdapter();
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("ScheMeConnectionString");
string connStrFiles = memLayer.ML.confReadString("ScheMeFilesConnectionString");
// connections del db vocabolario
taAP.Connection.ConnectionString = connStr;
taP2L.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.Pazienti2LabelsTableAdapter taP2L;
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
}
}