45be3057f6
- update voc - update db e ricerca lega
58 lines
1.8 KiB
C#
58 lines
1.8 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using SteamWare;
|
|
|
|
namespace C2P_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()
|
|
{
|
|
taQL = new DS_QuotesTableAdapters.QuoteListTableAdapter();
|
|
taVSCli = new DS_UtilityTableAdapters.v_selClientTableAdapter();
|
|
taVSItm = new DS_UtilityTableAdapters.v_selItemsTableAdapter();
|
|
taVSRM = new DS_UtilityTableAdapters.v_selRawMatTableAdapter();
|
|
}
|
|
/// <summary>
|
|
/// effettua setup dei connection strings da web.config della singola applicazione
|
|
/// </summary>
|
|
protected virtual void setupConnectionString()
|
|
{
|
|
string connStr = memLayer.ML.confReadString("C2PConnectionString");
|
|
// connections del db vocabolario
|
|
taQL.Connection.ConnectionString = connStr;
|
|
taVSCli.Connection.ConnectionString = connStr;
|
|
taVSItm.Connection.ConnectionString = connStr;
|
|
taVSRM.Connection.ConnectionString = connStr;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region area public
|
|
|
|
public DS_QuotesTableAdapters.QuoteListTableAdapter taQL;
|
|
public DS_UtilityTableAdapters.v_selClientTableAdapter taVSCli;
|
|
public DS_UtilityTableAdapters.v_selItemsTableAdapter taVSItm;
|
|
public DS_UtilityTableAdapters.v_selRawMatTableAdapter taVSRM;
|
|
|
|
public static DtProxy man = new DtProxy();
|
|
|
|
#endregion
|
|
}
|
|
}
|