Files
C2P/C2P_Data/DtProxy.cs
T

81 lines
3.3 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
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();
taQFQ = new DS_QuotesTableAdapters.QuoteFull_QTableAdapter();
taQRM = new DS_QuotesTableAdapters.QuoteRMTableAdapter();
taRMD = new DS_QuotesTableAdapters.RawMatDetTableAdapter();
taSCL = new DS_QuotesTableAdapters.StdCostListTableAdapter();
taVSCli = new DS_UtilityTableAdapters.v_selClientTableAdapter();
taVSItm = new DS_UtilityTableAdapters.v_selItemsTableAdapter();
taVSRM = new DS_UtilityTableAdapters.v_selRawMatTableAdapter();
taRPT = new DS_UtilityTableAdapters.ReportPrintTicketTableAdapter();
taO4I = new DS_UtilityTableAdapters.Offers4ItemTableAdapter();
taOH = new DS_UtilityTableAdapters.OrderHistTableAdapter();
taSC2C = new DS_UtilityTableAdapters.StdCost2createTableAdapter();
}
/// <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;
taQFQ.Connection.ConnectionString = connStr;
taQRM.Connection.ConnectionString = connStr;
taRMD.Connection.ConnectionString = connStr;
taSCL.Connection.ConnectionString = connStr;
taVSCli.Connection.ConnectionString = connStr;
taVSItm.Connection.ConnectionString = connStr;
taVSRM.Connection.ConnectionString = connStr;
taRPT.Connection.ConnectionString = connStr;
taO4I.Connection.ConnectionString = connStr;
taOH.Connection.ConnectionString = connStr;
taSC2C.Connection.ConnectionString = connStr;
}
#endregion
#region area public
public DS_QuotesTableAdapters.QuoteListTableAdapter taQL;
public DS_QuotesTableAdapters.QuoteFull_QTableAdapter taQFQ;
public DS_QuotesTableAdapters.QuoteRMTableAdapter taQRM;
public DS_QuotesTableAdapters.RawMatDetTableAdapter taRMD;
public DS_QuotesTableAdapters.StdCostListTableAdapter taSCL;
public DS_UtilityTableAdapters.v_selClientTableAdapter taVSCli;
public DS_UtilityTableAdapters.v_selItemsTableAdapter taVSItm;
public DS_UtilityTableAdapters.v_selRawMatTableAdapter taVSRM;
public DS_UtilityTableAdapters.ReportPrintTicketTableAdapter taRPT;
public DS_UtilityTableAdapters.Offers4ItemTableAdapter taO4I;
public DS_UtilityTableAdapters.OrderHistTableAdapter taOH;
public DS_UtilityTableAdapters.StdCost2createTableAdapter taSC2C;
public static DtProxy man = new DtProxy();
#endregion
}
}