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(); } /// /// procedura di avvio dei tableAdapter /// 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(); } /// /// effettua setup dei connection strings da web.config della singola applicazione /// 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 } }