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(); } /// /// procedura di avvio dei tableAdapter /// protected virtual void avvioTableAdapters() { taQL = new DS_QuotesTableAdapters.QuoteListTableAdapter(); taQFQ = new DS_QuotesTableAdapters.QuoteFull_QTableAdapter(); taQRM = new DS_QuotesTableAdapters.QuoteRMTableAdapter(); 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(); } /// /// effettua setup dei connection strings da web.config della singola applicazione /// 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; taVSCli.Connection.ConnectionString = connStr; taVSItm.Connection.ConnectionString = connStr; taVSRM.Connection.ConnectionString = connStr; taRPT.Connection.ConnectionString = connStr; taO4I.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_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 static DtProxy man = new DtProxy(); #endregion } }