147 lines
4.6 KiB
C#
147 lines
4.6 KiB
C#
using SteamWare;
|
|
|
|
namespace AppData
|
|
{
|
|
public class dataLayer
|
|
{
|
|
#region Public Fields
|
|
|
|
/// <summary>
|
|
/// singleton classe
|
|
/// </summary>
|
|
public static dataLayer man = new dataLayer();
|
|
|
|
/// <summary>
|
|
/// Elenco POSTAZIONI
|
|
/// </summary>
|
|
public DS_AppTableAdapters.AnagFasiTableAdapter taAF;
|
|
|
|
/// <summary>
|
|
/// Elenco TASK
|
|
/// </summary>
|
|
public DS_UtilityTableAdapters.AnagKeyValueTableAdapter taAKV;
|
|
|
|
/// <summary>
|
|
/// Elenco ARTICOLI
|
|
/// </summary>
|
|
public DS_AppTableAdapters.AnagArticoliTableAdapter taAnArt;
|
|
|
|
/// <summary>
|
|
/// Elenco OPERATORI
|
|
/// </summary>
|
|
public DS_AppTableAdapters.AnagOprTableAdapter taAO;
|
|
|
|
/// <summary>
|
|
/// Elenco POSTAZIONI
|
|
/// </summary>
|
|
public DS_AppTableAdapters.AnagPostTableAdapter taAP;
|
|
|
|
/// <summary>
|
|
/// Elenco TAG
|
|
/// </summary>
|
|
public DS_AppTableAdapters.AnagTagTableAdapter taAT;
|
|
|
|
/// <summary>
|
|
/// Elenco PROMESSE ODL
|
|
/// </summary>
|
|
public DS_AppTableAdapters.Opr2PostTableAdapter taO2P;
|
|
|
|
/// <summary>
|
|
/// Elenco PROMESSE ODL
|
|
/// </summary>
|
|
public DS_AppTableAdapters.PODLTableAdapter taPODL;
|
|
|
|
/// <summary>
|
|
/// Elenco TASK
|
|
/// </summary>
|
|
public DS_AppTableAdapters.TraEv2StatiTableAdapter taTE2S;
|
|
|
|
/// <summary>
|
|
/// Elenco TASK
|
|
/// </summary>
|
|
public DS_AppTableAdapters.TaskListTableAdapter taTL;
|
|
|
|
/// <summary>
|
|
/// Elenco TASK
|
|
/// </summary>
|
|
public DS_AppTableAdapters.TaskList2PostTableAdapter taTL2Post;
|
|
|
|
/// <summary>
|
|
/// Elenco TASK
|
|
/// </summary>
|
|
public DS_AppTableAdapters.TaskRecTableAdapter taTR;
|
|
|
|
/// <summary>
|
|
/// Elenco TASK Aggregati
|
|
/// </summary>
|
|
public DS_AppTableAdapters.TaskRecAggTableAdapter taTRA;
|
|
|
|
#endregion Public Fields
|
|
|
|
#region Protected Constructors
|
|
|
|
/// <summary>
|
|
/// avvio classe
|
|
/// </summary>
|
|
public dataLayer()
|
|
{
|
|
avvioTA();
|
|
setupConnectionStringBase();
|
|
}
|
|
|
|
#endregion Protected Constructors
|
|
|
|
#region Private Methods
|
|
|
|
/// <summary>
|
|
/// avvia table adapters
|
|
/// </summary>
|
|
private void avvioTA()
|
|
{
|
|
// avvio i table adapters...
|
|
taAnArt = new DS_AppTableAdapters.AnagArticoliTableAdapter();
|
|
taAF = new DS_AppTableAdapters.AnagFasiTableAdapter();
|
|
taAO = new DS_AppTableAdapters.AnagOprTableAdapter();
|
|
taAP = new DS_AppTableAdapters.AnagPostTableAdapter();
|
|
taAT = new DS_AppTableAdapters.AnagTagTableAdapter();
|
|
taO2P = new DS_AppTableAdapters.Opr2PostTableAdapter();
|
|
taPODL = new DS_AppTableAdapters.PODLTableAdapter();
|
|
taTL = new DS_AppTableAdapters.TaskListTableAdapter();
|
|
taTL2Post = new DS_AppTableAdapters.TaskList2PostTableAdapter();
|
|
taTR = new DS_AppTableAdapters.TaskRecTableAdapter();
|
|
taTRA = new DS_AppTableAdapters.TaskRecAggTableAdapter();
|
|
taTE2S = new DS_AppTableAdapters.TraEv2StatiTableAdapter();
|
|
|
|
taAKV = new DS_UtilityTableAdapters.AnagKeyValueTableAdapter();
|
|
}
|
|
|
|
#endregion Private Methods
|
|
|
|
#region Protected Methods
|
|
|
|
/// <summary>
|
|
/// effettua setup dei connection strings da web.config delal singola applicazione
|
|
/// </summary>
|
|
protected virtual void setupConnectionStringBase()
|
|
{
|
|
string connString = memLayer.ML.confReadString("CTrackConnectionString");
|
|
// connections strings del db
|
|
taAnArt.Connection.ConnectionString = connString;
|
|
taAF.Connection.ConnectionString = connString;
|
|
taAO.Connection.ConnectionString = connString;
|
|
taAP.Connection.ConnectionString = connString;
|
|
taAT.Connection.ConnectionString = connString;
|
|
taO2P.Connection.ConnectionString = connString;
|
|
taPODL.Connection.ConnectionString = connString;
|
|
taTL.Connection.ConnectionString = connString;
|
|
taTL2Post.Connection.ConnectionString = connString;
|
|
taTR.Connection.ConnectionString = connString;
|
|
taTRA.Connection.ConnectionString = connString;
|
|
taTE2S.Connection.ConnectionString = connString;
|
|
|
|
taAKV.Connection.ConnectionString = connString;
|
|
}
|
|
|
|
#endregion Protected Methods
|
|
}
|
|
} |