Files
medpred/MedPred_Data/DtProxy.cs
T
2014-04-24 15:05:12 +02:00

51 lines
1.4 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();
}
/// <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;
}
#endregion
#region area public
public DS_ApplicazioneTableAdapters.AnagPazientiTableAdapter taAP;
public DS_ApplicazioneTableAdapters.VisGenTableAdapter taVGen;
public static DtProxy man = new DtProxy();
#endregion
}
}