Files

231 lines
10 KiB
C#

using System;
using System.Collections.Generic;
using System.Web;
using SteamWare;
/// <summary>
/// Summary description for TA_app
/// </summary>
public class TA_app
{
#region table adapters
public GIM_dataLayer.DS_applicazioneTableAdapters.LogUpdateDbTableAdapter taLogUpdate;
public GIM_dataLayer.DS_applicazioneTableAdapters.AnagImpiantiTableAdapter taImpianti;
public GIM_dataLayer.DS_applicazioneTableAdapters.v_macchineTableAdapter taMacchine;
public GIM_dataLayer.DS_applicazioneTableAdapters.v_selFamMaccTableAdapter taMacc2Fam;
public GIM_dataLayer.DS_applicazioneTableAdapters.v_intervExpTableAdapter taInterventiMtz;
public GIM_dataLayer.DS_applicazioneTableAdapters.AnagStatiTableAdapter taStati;
public GIM_dataLayer.DS_applicazioneTableAdapters.AnagPrioritaTableAdapter taPrior;
public GIM_dataLayer.DS_applicazioneTableAdapters.InterventoOpMtzTableAdapter taIntOpMtz;
public GIM_dataLayer.DS_applicazioneTableAdapters.v_mtzProgExpTableAdapter taMtzPro;
public GIM_dataLayer.DS_applicazioneTableAdapters.CalendFesteFerieTableAdapter taCalFF;
public GIM_dataLayer.DS_applicazioneTableAdapters.OreAperturaSettTableAdapter taOreApert;
public GIM_dataLayer.DS_applicazioneTableAdapters.FiltroImpiantiTableAdapter taFiltImp;
public GIM_dataLayer.DS_applicazioneTableAdapters.FiltroMacchineTableAdapter taFiltMac;
public GIM_dataLayer.DS_applicazioneTableAdapters.FiltroStatiTableAdapter taFiltSta;
public GIM_dataLayer.DS_applicazioneTableAdapters.AnagCausaliTableAdapter taAnagCau;
public GIM_dataLayer.DS_applicazioneTableAdapters.ImpiegoRisorseTableAdapter taImpRis;
public GIM_dataLayer.DS_applicazioneTableAdapters.v_allDataTableAdapter taAllData;
public GIM_dataLayer.DS_applicazioneTableAdapters.ElencoIntervExtTableAdapter taElencoIntExt;
public GIM_dataLayer.DS_applicazioneTableAdapters.MtzProg_ScadenzeTableAdapter taScadenze;
public GIM_dataLayer.DS_MagTableAdapters.AnagItemsTableAdapter taAnagItem;
public GIM_dataLayer.DS_MagTableAdapters.AnagLocazioniTableAdapter taAnagLoc;
public GIM_dataLayer.DS_MagTableAdapters.AnagTagsTableAdapter taAnagTags;
public GIM_dataLayer.DS_MagTableAdapters.MagRicTableAdapter taMagRic;
public GIM_dataLayer.DS_MagTableAdapters.MovMagRicTableAdapter taMovMag;
public GIM_dataLayer.DS_MagTableAdapters.SinonimiTagTableAdapter taSinTag;
public GIM_dataLayer.DS_MagTableAdapters.StatoMagTableAdapter taStatoMag;
public GIM_dataLayer.DS_MagTableAdapters.Tag2ItemTableAdapter taTag2Item;
public GIM_dataLayer.DS_MagTableAdapters.Tag2MaccTableAdapter taTag2Macc;
public GIM_dataLayer.DS_utilityTableAdapters.v_elencoImpiantiMacchineTableAdapter taElencoImpMacch;
public GIM_dataLayer.DS_utilityTableAdapters.v_elencoIntervFiltTableAdapter taElencoIntFilt;
public GIM_dataLayer.DS_utilityTableAdapters.sp_elencoIntMTBF_MTTRTableAdapter taElenco_MTBF_MTTR;
public GIM_dataLayer.DS_utilityTableAdapters.v_selImpiantiTableAdapter taSelImpianti;
public GIM_dataLayer.DS_utilityTableAdapters.v_selMacchineTableAdapter taSelMacchine;
public GIM_dataLayer.DS_utilityTableAdapters.v_selOperMtzTableAdapter taSelMatrOp;
public GIM_dataLayer.DS_utilityTableAdapters.v_selCodRicAmmTableAdapter taSelCRA;
#endregion
/// <summary>
/// effettua setup dei connection strings da web.config della singola applicazione
/// </summary>
protected virtual void setupConnectionString()
{
// connections del db
string connString = memLayer.ML.confReadString("AppConnectionString");
taLogUpdate.Connection.ConnectionString = connString;
taImpianti.Connection.ConnectionString = connString;
taMacchine.Connection.ConnectionString = connString;
taSelImpianti.Connection.ConnectionString = connString;
taSelMacchine.Connection.ConnectionString = connString;
taMacc2Fam.Connection.ConnectionString = connString;
taInterventiMtz.Connection.ConnectionString = connString;
taStati.Connection.ConnectionString = connString;
taPrior.Connection.ConnectionString = connString;
taIntOpMtz.Connection.ConnectionString = connString;
taMtzPro.Connection.ConnectionString = connString;
taElencoImpMacch.Connection.ConnectionString = connString;
taElencoIntFilt.Connection.ConnectionString = connString;
taElenco_MTBF_MTTR.Connection.ConnectionString = connString;
taCalFF.Connection.ConnectionString = connString;
taOreApert.Connection.ConnectionString = connString;
taFiltImp.Connection.ConnectionString = connString;
taFiltMac.Connection.ConnectionString = connString;
taFiltSta.Connection.ConnectionString = connString;
taAnagCau.Connection.ConnectionString = connString;
taSelMatrOp.Connection.ConnectionString = connString;
taSelCRA.Connection.ConnectionString = connString;
taImpRis.Connection.ConnectionString = connString;
taAllData.Connection.ConnectionString = connString;
taElencoIntExt.Connection.ConnectionString = connString;
taScadenze.Connection.ConnectionString = connString;
taAnagItem.Connection.ConnectionString = connString;
taAnagLoc.Connection.ConnectionString = connString;
taAnagTags.Connection.ConnectionString = connString;
taMagRic.Connection.ConnectionString = connString;
taMovMag.Connection.ConnectionString = connString;
taSinTag.Connection.ConnectionString = connString;
taStatoMag.Connection.ConnectionString = connString;
taTag2Item.Connection.ConnectionString = connString;
taTag2Macc.Connection.ConnectionString = connString;
}
protected TA_app()
{
initTA();
setupConnectionString();
}
private void initTA()
{
// avvio table adapters
taLogUpdate = new GIM_dataLayer.DS_applicazioneTableAdapters.LogUpdateDbTableAdapter();
taImpianti = new GIM_dataLayer.DS_applicazioneTableAdapters.AnagImpiantiTableAdapter();
taMacchine = new GIM_dataLayer.DS_applicazioneTableAdapters.v_macchineTableAdapter();
taSelImpianti = new GIM_dataLayer.DS_utilityTableAdapters.v_selImpiantiTableAdapter();
taSelMacchine = new GIM_dataLayer.DS_utilityTableAdapters.v_selMacchineTableAdapter();
taMacc2Fam = new GIM_dataLayer.DS_applicazioneTableAdapters.v_selFamMaccTableAdapter();
taInterventiMtz = new GIM_dataLayer.DS_applicazioneTableAdapters.v_intervExpTableAdapter();
taStati = new GIM_dataLayer.DS_applicazioneTableAdapters.AnagStatiTableAdapter();
taPrior = new GIM_dataLayer.DS_applicazioneTableAdapters.AnagPrioritaTableAdapter();
taIntOpMtz = new GIM_dataLayer.DS_applicazioneTableAdapters.InterventoOpMtzTableAdapter();
taMtzPro = new GIM_dataLayer.DS_applicazioneTableAdapters.v_mtzProgExpTableAdapter();
taElencoImpMacch = new GIM_dataLayer.DS_utilityTableAdapters.v_elencoImpiantiMacchineTableAdapter();
taElencoIntFilt = new GIM_dataLayer.DS_utilityTableAdapters.v_elencoIntervFiltTableAdapter();
taElenco_MTBF_MTTR = new GIM_dataLayer.DS_utilityTableAdapters.sp_elencoIntMTBF_MTTRTableAdapter();
taCalFF = new GIM_dataLayer.DS_applicazioneTableAdapters.CalendFesteFerieTableAdapter();
taOreApert = new GIM_dataLayer.DS_applicazioneTableAdapters.OreAperturaSettTableAdapter();
taFiltImp = new GIM_dataLayer.DS_applicazioneTableAdapters.FiltroImpiantiTableAdapter();
taFiltMac = new GIM_dataLayer.DS_applicazioneTableAdapters.FiltroMacchineTableAdapter();
taFiltSta = new GIM_dataLayer.DS_applicazioneTableAdapters.FiltroStatiTableAdapter();
taAnagCau = new GIM_dataLayer.DS_applicazioneTableAdapters.AnagCausaliTableAdapter();
taSelMatrOp = new GIM_dataLayer.DS_utilityTableAdapters.v_selOperMtzTableAdapter();
taSelCRA = new GIM_dataLayer.DS_utilityTableAdapters.v_selCodRicAmmTableAdapter();
taImpRis = new GIM_dataLayer.DS_applicazioneTableAdapters.ImpiegoRisorseTableAdapter();
taAllData = new GIM_dataLayer.DS_applicazioneTableAdapters.v_allDataTableAdapter();
taElencoIntExt = new GIM_dataLayer.DS_applicazioneTableAdapters.ElencoIntervExtTableAdapter();
taScadenze = new GIM_dataLayer.DS_applicazioneTableAdapters.MtzProg_ScadenzeTableAdapter();
taAnagItem = new GIM_dataLayer.DS_MagTableAdapters.AnagItemsTableAdapter();
taAnagLoc = new GIM_dataLayer.DS_MagTableAdapters.AnagLocazioniTableAdapter();
taAnagTags = new GIM_dataLayer.DS_MagTableAdapters.AnagTagsTableAdapter();
taMagRic = new GIM_dataLayer.DS_MagTableAdapters.MagRicTableAdapter();
taMovMag = new GIM_dataLayer.DS_MagTableAdapters.MovMagRicTableAdapter();
taSinTag = new GIM_dataLayer.DS_MagTableAdapters.SinonimiTagTableAdapter();
taStatoMag = new GIM_dataLayer.DS_MagTableAdapters.StatoMagTableAdapter();
taTag2Item = new GIM_dataLayer.DS_MagTableAdapters.Tag2ItemTableAdapter();
taTag2Macc = new GIM_dataLayer.DS_MagTableAdapters.Tag2MaccTableAdapter();
}
/// <summary>
/// Singleton
/// </summary>
public static TA_app obj = new TA_app();
/// <summary>
/// restituisce versione corrente del db applicativo
/// </summary>
public int appDB_act
{
get
{
int answ = -1;
try
{
answ = (int)taLogUpdate.getDbVers();
}
catch
{
logger.lg.scriviLog("Errore recupero versione DB applicativo GIM!", tipoLog.EXCEPTION);
}
return answ;
}
}
/// <summary>
/// restituisce versione corrente del db vocabolario
/// </summary>
public int vocDB_act
{
get
{
int answ = -1;
try
{
answ = (int)DataWrap.DW.taLogVoc.getDbVers();
}
catch
{
logger.lg.scriviLog("Errore recupero versione DB Vocabolario!", tipoLog.EXCEPTION);
}
return answ;
}
}
/// <summary>
/// restituisce versione corrente del db anagrafica
/// </summary>
public int anaDB_act
{
get
{
int answ = -1;
try
{
answ = answ = (int)DataWrap.DW.taLogAna.getDbVers();
}
catch
{
logger.lg.scriviLog("Errore recupero versione DB Anagrafica!", tipoLog.EXCEPTION);
}
return answ;
}
}
/// <summary>
/// restituisce versione richiesta per il db applicativo
/// </summary>
public int appDB_req
{
get
{
return memLayer.ML.confReadInt("dbAppVers");
}
}
/// <summary>
/// restituisce versione richiesta per il db vocabolario
/// </summary>
public int vocDB_req
{
get
{
return memLayer.ML.confReadInt("dbVocabVers");
}
}
/// <summary>
/// restituisce versione richiesta per il db anagrafica
/// </summary>
public int anaDB_req
{
get
{
return memLayer.ML.confReadInt("dbAuthVers");
}
}
}