diff --git a/ETS-DIP/ETS-WS/obj/Debug/ETS-DIP.csproj.AssemblyReference.cache b/ETS-DIP/ETS-WS/obj/Debug/ETS-DIP.csproj.AssemblyReference.cache index 02a6d15..d838d78 100644 Binary files a/ETS-DIP/ETS-WS/obj/Debug/ETS-DIP.csproj.AssemblyReference.cache and b/ETS-DIP/ETS-WS/obj/Debug/ETS-DIP.csproj.AssemblyReference.cache differ diff --git a/ETS_Data/DataProxy_ProjEts.cs b/ETS_Data/DataProxy_ProjEts.cs index b188007..522d1cc 100644 --- a/ETS_Data/DataProxy_ProjEts.cs +++ b/ETS_Data/DataProxy_ProjEts.cs @@ -5,136 +5,220 @@ using System.Text; namespace ETS_Data { - /// - /// classe proxy dati x PROJ-ETS - /// - public class DataProxy_ProjEts - { - #region area table adapters - - /* Ds_ProjEts */ - public Ds_ProjEtsTableAdapters.AnagLabelsTableAdapter taAL; - public Ds_ProjEtsTableAdapters.AnagProgettiTableAdapter taAP; - public Ds_ProjEtsTableAdapters.AnagFasiTableAdapter taAF; - public Ds_ProjEtsTableAdapters.DatiCommessaTableAdapter taDC; - public Ds_ProjEtsTableAdapters.DatiCommFornTableAdapter taDCF; - public Ds_ProjEtsTableAdapters.DatiCommIntegTableAdapter taDCI; - public Ds_ProjEtsTableAdapters.BdgtRisorseFasiTableAdapter taBRF; - public Ds_ProjEtsTableAdapters.AnagTipoRisorseTableAdapter taATR; - public Ds_ProjEtsTableAdapters.BazaarRisorseTableAdapter taBaz; - public Ds_ProjEtsTableAdapters.Dip2ATRTableAdapter taD2ATR; - public Ds_ProjEtsTableAdapters.DipendentiTableAdapter taDip; - public Ds_ProjEtsTableAdapters.ImpiegoRisorseTableAdapter taIR; - public Ds_ProjEtsTableAdapters.LabelsCommTableAdapter taL2C; - public Ds_ProjEtsTableAdapters.LogEmailBazTableAdapter taLEB; - public Ds_ProjEtsTableAdapters.ReleasedWeekTableAdapter taReW; - public Ds_ProjEtsTableAdapters.TLockBazRATableAdapter taTLB; - public Ds_ProjEtsTableAdapters.v_CommessaTableAdapter taVComm; - /* DS_utilsProjEts */ - public DS_utilsProjEtsTableAdapters.v_selClientiTableAdapter taSelCli; - public DS_utilsProjEtsTableAdapters.v_selProgettiTableAdapter taSelPro; - public DS_utilsProjEtsTableAdapters.v_selCommesseTableAdapter taSelCom; - public DS_utilsProjEtsTableAdapters.v_selFornitoriClaTableAdapter taSelForn; - public DS_utilsProjEtsTableAdapters.v_FattureETSTableAdapter taFattETS; - /// - /// init dei table adapters + /// classe proxy dati x PROJ-ETS /// - protected void initTA() + public class DataProxy_ProjEts { - taAL = new Ds_ProjEtsTableAdapters.AnagLabelsTableAdapter(); - taAP = new Ds_ProjEtsTableAdapters.AnagProgettiTableAdapter(); - taAF = new Ds_ProjEtsTableAdapters.AnagFasiTableAdapter(); - taDC = new Ds_ProjEtsTableAdapters.DatiCommessaTableAdapter(); - taDCF = new Ds_ProjEtsTableAdapters.DatiCommFornTableAdapter(); - taDCI = new Ds_ProjEtsTableAdapters.DatiCommIntegTableAdapter(); - taBRF = new Ds_ProjEtsTableAdapters.BdgtRisorseFasiTableAdapter(); - taATR = new Ds_ProjEtsTableAdapters.AnagTipoRisorseTableAdapter(); - taBaz = new Ds_ProjEtsTableAdapters.BazaarRisorseTableAdapter(); - taD2ATR = new Ds_ProjEtsTableAdapters.Dip2ATRTableAdapter(); - taDip = new Ds_ProjEtsTableAdapters.DipendentiTableAdapter(); - taIR = new Ds_ProjEtsTableAdapters.ImpiegoRisorseTableAdapter(); - taL2C = new Ds_ProjEtsTableAdapters.LabelsCommTableAdapter(); - taLEB = new Ds_ProjEtsTableAdapters.LogEmailBazTableAdapter(); - taReW = new Ds_ProjEtsTableAdapters.ReleasedWeekTableAdapter(); - taTLB = new Ds_ProjEtsTableAdapters.TLockBazRATableAdapter(); - taVComm = new Ds_ProjEtsTableAdapters.v_CommessaTableAdapter(); - taSelCli = new DS_utilsProjEtsTableAdapters.v_selClientiTableAdapter(); - taSelPro = new DS_utilsProjEtsTableAdapters.v_selProgettiTableAdapter(); - taSelCom = new DS_utilsProjEtsTableAdapters.v_selCommesseTableAdapter(); - taSelForn = new DS_utilsProjEtsTableAdapters.v_selFornitoriClaTableAdapter(); - taFattETS = new DS_utilsProjEtsTableAdapters.v_FattureETSTableAdapter(); - } - /// - /// effettua setup dei connection strings da web.config delal singola applicazione - /// - protected virtual void setupConnectionStringBase() - { - // connections del db - taAL.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); - taAP.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); - taAF.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); - taDC.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); - taDCF.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); - taDCI.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); - taBRF.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); - taATR.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); - taBaz.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); - taD2ATR.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); - taDip.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); - taIR.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); - taL2C.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); - taLEB.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); - taReW.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); - taTLB.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); - taVComm.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); - taSelCli.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); - taSelPro.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); - taSelCom.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); - taSelForn.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); - taFattETS.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); - } + /* Ds_ProjEts */ - #endregion + #region Protected Fields - protected DataProxy_ProjEts() - { - initTA(); - setupConnectionStringBase(); - } - /// - /// Singleton accesso a DataProxy - /// - public static DataProxy_ProjEts DP = new DataProxy_ProjEts(); + protected Ds_ProjEts.BazaarRisorseDataTable tabBazSingle = new Ds_ProjEts.BazaarRisorseDataTable(); + protected DS_utilsProjEts.v_selCommesseDataTable tabComm = new DS_utilsProjEts.v_selCommesseDataTable(); + protected Ds_ProjEts.Dip2ATRDataTable tabD2ATR = new Ds_ProjEts.Dip2ATRDataTable(); + protected Ds_ProjEts.DipendentiDataTable tabDip = new Ds_ProjEts.DipendentiDataTable(); - #region utility public esposte + #endregion Protected Fields + #region Public Fields - /// - /// idxDipendente in sessione - /// - public static int idxDipendente - { - get - { - int idx = 0; - try + /// + /// Singleton accesso a DataProxy + /// + public static DataProxy_ProjEts DP = new DataProxy_ProjEts(); + + public Ds_ProjEtsTableAdapters.AnagFasiTableAdapter taAF; + public Ds_ProjEtsTableAdapters.AnagLabelsTableAdapter taAL; + public Ds_ProjEtsTableAdapters.AnagProgettiTableAdapter taAP; + public Ds_ProjEtsTableAdapters.AnagTipoRisorseTableAdapter taATR; + public Ds_ProjEtsTableAdapters.BazaarRisorseTableAdapter taBaz; + public Ds_ProjEtsTableAdapters.BdgtRisorseFasiTableAdapter taBRF; + public Ds_ProjEtsTableAdapters.Dip2ATRTableAdapter taD2ATR; + public Ds_ProjEtsTableAdapters.DatiCommessaTableAdapter taDC; + public Ds_ProjEtsTableAdapters.DatiCommFornTableAdapter taDCF; + public Ds_ProjEtsTableAdapters.DatiCommIntegTableAdapter taDCI; + public Ds_ProjEtsTableAdapters.DipendentiTableAdapter taDip; + public DS_utilsProjEtsTableAdapters.v_FattureETSTableAdapter taFattETS; + public Ds_ProjEtsTableAdapters.ImpiegoRisorseTableAdapter taIR; + public Ds_ProjEtsTableAdapters.LabelsCommTableAdapter taL2C; + public Ds_ProjEtsTableAdapters.LogEmailBazTableAdapter taLEB; + public Ds_ProjEtsTableAdapters.ReleasedWeekTableAdapter taReW; + public DS_utilsProjEtsTableAdapters.v_selClientiTableAdapter taSelCli; + public DS_utilsProjEtsTableAdapters.v_selCommesseTableAdapter taSelCom; + public DS_utilsProjEtsTableAdapters.v_selFornitoriClaTableAdapter taSelForn; + public DS_utilsProjEtsTableAdapters.v_selProgettiTableAdapter taSelPro; + public Ds_ProjEtsTableAdapters.TLockBazRATableAdapter taTLB; + public Ds_ProjEtsTableAdapters.v_CommessaTableAdapter taVComm; + + #endregion Public Fields + + /* DS_utilsProjEts */ + + #region Protected Constructors + + protected DataProxy_ProjEts() { - idx = utils.obj.IntSessionObj("IdxDipendente"); + initTA(); + setupConnectionStringBase(); } - catch - { } - return idx; - } - set - { - utils.obj.setSessionVal("idxDipendente", value); - } - } - public string CognomeNomeByIdx(int idxDip) - { - string answ = ""; + #endregion Protected Constructors + + #region Public Properties + + /// + /// idxDipendente in sessione + /// + public static int idxDipendente + { + get + { + int idx = 0; + try + { + idx = utils.obj.IntSessionObj("IdxDipendente"); + } + catch + { } + return idx; + } + set + { + utils.obj.setSessionVal("idxDipendente", value); + } + } + + #endregion Public Properties + + #region Protected Methods + + /// + /// Formatta blocco impegno x dipendente x una specifica data + /// + /// identificativo dipendente + /// anno di riferimento + /// settimana desiderata + /// shift (add) da applicare con base lunedì (0..4) + /// + protected string getAgendByDate(int idxDipendente, int anno, int sett, int shiftDay) + { + // variabili + string answ = ""; + DS_utilsProjEts.v_selCommesseRow rigaComm; + + // parto dal lunedì della sett indicata! + DateTime dataRif = datario.FirstDateOfWeekISO8601(anno, sett); + dataRif = dataRif.AddDays(shiftDay); + + // inserisco intestazione con data + answ += string.Format("{0:dd.MM.yyyy} {0:dddd}", dataRif).ToUpper(); + + // recupero tutte le assegnazioni x la giornata indicata (cerco alla posizione shiftDay se è != 0) + Ds_ProjEts.BazaarRisorseRow[] commGG = (Ds_ProjEts.BazaarRisorseRow[])tabBazSingle.Select(string.Format("SUBSTRING(SchemaWeek, {0}, 1) <> 0", shiftDay + 1)); + foreach (Ds_ProjEts.BazaarRisorseRow riga in commGG) + { + // recupero dati commessa... + rigaComm = (DS_utilsProjEts.v_selCommesseRow)tabComm.Select(string.Format("value = {0}", riga.idxFase))[0]; + answ += string.Format("{0} {1}", utils.trimChar(rigaComm.label, utils.obj.confReadInt("maxCharNomeComm")), riga.SchemaWeek); + } + // aggiungo spaziatura + answ += "

"; + + return answ; + } + + /// + /// Formatta blocco impegni del dipendente x la settimana indicata + /// + /// identificativo dipendente + /// anno di riferimento + /// settimana desiderata + /// + protected string getAgendDip(int idxDipendente, int anno, int sett) + { + //default + string answ = ""; + // inizio a comporre tabella utente + answ += ""; + // recupero i dati x il dipendente corrente... + tabBazSingle = DataProxy_ProjEts.DP.taBaz.getByAnnoSettDip(anno, sett, idxDipendente); + // compongo la settimana a partire dalla data richiesta... + for (int i = 0; i < 5; i++) + { + answ += getAgendByDate(idxDipendente, anno, sett, i); + } + answ += "
"; + // restituisco risultato + return answ; + } + + /// + /// init dei table adapters + /// + protected void initTA() + { + taAF = new Ds_ProjEtsTableAdapters.AnagFasiTableAdapter(); + taAL = new Ds_ProjEtsTableAdapters.AnagLabelsTableAdapter(); + taAP = new Ds_ProjEtsTableAdapters.AnagProgettiTableAdapter(); + taATR = new Ds_ProjEtsTableAdapters.AnagTipoRisorseTableAdapter(); + taDC = new Ds_ProjEtsTableAdapters.DatiCommessaTableAdapter(); + taDCF = new Ds_ProjEtsTableAdapters.DatiCommFornTableAdapter(); + taDCI = new Ds_ProjEtsTableAdapters.DatiCommIntegTableAdapter(); + taBRF = new Ds_ProjEtsTableAdapters.BdgtRisorseFasiTableAdapter(); + taBaz = new Ds_ProjEtsTableAdapters.BazaarRisorseTableAdapter(); + taD2ATR = new Ds_ProjEtsTableAdapters.Dip2ATRTableAdapter(); + taDip = new Ds_ProjEtsTableAdapters.DipendentiTableAdapter(); + taIR = new Ds_ProjEtsTableAdapters.ImpiegoRisorseTableAdapter(); + taL2C = new Ds_ProjEtsTableAdapters.LabelsCommTableAdapter(); + taLEB = new Ds_ProjEtsTableAdapters.LogEmailBazTableAdapter(); + taReW = new Ds_ProjEtsTableAdapters.ReleasedWeekTableAdapter(); + taTLB = new Ds_ProjEtsTableAdapters.TLockBazRATableAdapter(); + taVComm = new Ds_ProjEtsTableAdapters.v_CommessaTableAdapter(); + taSelCli = new DS_utilsProjEtsTableAdapters.v_selClientiTableAdapter(); + taSelPro = new DS_utilsProjEtsTableAdapters.v_selProgettiTableAdapter(); + taSelCom = new DS_utilsProjEtsTableAdapters.v_selCommesseTableAdapter(); + taSelForn = new DS_utilsProjEtsTableAdapters.v_selFornitoriClaTableAdapter(); + taFattETS = new DS_utilsProjEtsTableAdapters.v_FattureETSTableAdapter(); + } + + /// + /// effettua setup dei connection strings da web.config delal singola applicazione + /// + protected virtual void setupConnectionStringBase() + { + // connections del db + taAF.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); + taAL.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); + taAP.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); + taATR.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); + taDC.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); + taDCF.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); + taDCI.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); + taBRF.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); + taBaz.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); + taD2ATR.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); + taDip.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); + taIR.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); + taL2C.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); + taLEB.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); + taReW.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); + taTLB.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); + taVComm.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); + taSelCli.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); + taSelPro.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); + taSelCom.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); + taSelForn.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); + taFattETS.Connection.ConnectionString = utils.obj.confReadString("ETS_PROJConnectionString"); + } + + #endregion Protected Methods + + #region Public Methods + + public string CognomeNomeByIdx(int idxDip) + { + string answ = ""; #if false try { @@ -142,178 +226,117 @@ namespace ETS_Data answ = string.Format("{0} {1}", rigaDip.Cognome, rigaDip.Nome); } catch - { } + { } #endif - return answ; - } - /// - /// calcola se una commessa sia attiva (da idxFase) - /// - /// - /// - public bool commessaAttiva(int idxFase) - { - bool answ = false; - try - { - answ = taAF.getByIdx(idxFase)[0].Attivo; - } - catch - { } - return answ; - } - /// - /// effettua export su GPW dei singoli dipendenti delle ore programmate x la settimana indicata - /// - /// anno - /// num settimana 1-53 - /// Utente che congela la settimana - /// - public bool esportaBazaarSuGPW(int anno, int settimana, string UsernameAD) - { - bool answ = false; - try - { - taBaz.copy2GPW(anno, settimana, UsernameAD); - answ = true; - } - catch - { } - return answ; - } - - /// - /// invia email ai singoli dipendenti delle ore programmate x la settimana indicata con link a bazaar - /// - /// anno - /// num settimana 1-53 - /// - public bool inviaEmailBazaar(int anno, int settimana) - { - bool answ = false; - int inviate = 0; - string oggettoEmail = utils.obj.confReadString("emailBaz_subject"); - string fromEmail = utils.obj.confReadString("_fromEmail"); - string toEmail = ""; - string aCapo = "
"; - string corpoEmail = ""; - string progSett = ""; - int idxDipendente = 0; - // leggo tutte commesse ed i dipendenti... - tabComm = DataProxy_ProjEts.DP.taSelCom.GetData(); - tabDip = DataProxy_ProjEts.DP.taDip.GetData(); - tabD2ATR = DataProxy_ProjEts.DP.taD2ATR.getBazOrd(); - Ds_ProjEts.DipendentiRow rigaDip; - - - // ciclo su TUTTI i dipendenti inseriti come risorse in bazaar - foreach (Ds_ProjEts.Dip2ATRRow riga in tabD2ATR) - { - idxDipendente = riga.idxDipendente; - rigaDip = (Ds_ProjEts.DipendentiRow)tabDip.Select(string.Format("idxDipendente={0}", idxDipendente))[0]; - - // se sono in testing resetto email a mia... - if (utils.obj.confReadBool("testMode")) - { - toEmail = utils.obj.confReadString("stdEmail"); - } - else - { - toEmail = rigaDip.email; + return answ; } - corpoEmail = "
PROJ-ETS
"; - corpoEmail += string.Format(utils.obj.confReadString("emailBaz_body_Head") + " {1:00}/{0} - {2} {3}", anno, settimana, rigaDip.Cognome, rigaDip.Nome) + aCapo + aCapo; - corpoEmail += string.Format(@"{1}", utils.obj.confReadString("baseUrl"), utils.obj.confReadString("emailBaz_body_Link")); - corpoEmail += aCapo + aCapo; - // compongo la programmazione settimanale utente... EVENTUALMENTE CON GIORNI VUOTI!!! - - progSett = getAgendDip(idxDipendente, anno, settimana); - - corpoEmail += progSett; - corpoEmail += "" + utils.obj.confReadString("emailBaz_body_Firma") + ""; - try + /// + /// calcola se una commessa sia attiva (da idxFase) + /// + /// + /// + public bool commessaAttiva(int idxFase) { - // invio email con link + resoconto breve impegno settimanale - utils.gestEmail.geAuth.mandaEmail(fromEmail, toEmail, oggettoEmail, corpoEmail); - inviate++; + bool answ = false; + try + { + answ = taAF.getByIdx(idxFase)[0].Attivo; + } + catch + { } + return answ; } - catch - { } - if (utils.obj.confReadBool("testMode") && inviate > 5) + /// + /// effettua export su GPW dei singoli dipendenti delle ore programmate x la settimana indicata + /// + /// anno + /// num settimana 1-53 + /// Utente che congela la settimana + /// + public bool esportaBazaarSuGPW(int anno, int settimana, string UsernameAD) { - answ = true; - return answ; + bool answ = false; + try + { + taBaz.copy2GPW(anno, settimana, UsernameAD); + answ = true; + } + catch + { } + return answ; } - } - answ = inviate > 0; // controlla che ALMENO 1 email sia stata inviata... - return answ; + /// + /// invia email ai singoli dipendenti delle ore programmate x la settimana indicata con link a bazaar + /// + /// anno + /// num settimana 1-53 + /// + public bool inviaEmailBazaar(int anno, int settimana) + { + bool answ = false; + int inviate = 0; + string oggettoEmail = utils.obj.confReadString("emailBaz_subject"); + string fromEmail = utils.obj.confReadString("_fromEmail"); + string toEmail = ""; + string aCapo = "
"; + string corpoEmail = ""; + string progSett = ""; + int idxDipendente = 0; + // leggo tutte commesse ed i dipendenti... + tabComm = DataProxy_ProjEts.DP.taSelCom.GetData(); + tabDip = DataProxy_ProjEts.DP.taDip.GetData(); + tabD2ATR = DataProxy_ProjEts.DP.taD2ATR.getBazOrd(); + Ds_ProjEts.DipendentiRow rigaDip; + + // ciclo su TUTTI i dipendenti inseriti come risorse in bazaar + foreach (Ds_ProjEts.Dip2ATRRow riga in tabD2ATR) + { + idxDipendente = riga.idxDipendente; + rigaDip = (Ds_ProjEts.DipendentiRow)tabDip.Select(string.Format("idxDipendente={0}", idxDipendente))[0]; + + // se sono in testing resetto email a mia... + if (utils.obj.confReadBool("testMode")) + { + toEmail = utils.obj.confReadString("stdEmail"); + } + else + { + toEmail = rigaDip.email; + } + + corpoEmail = "
PROJ-ETS
"; + corpoEmail += string.Format(utils.obj.confReadString("emailBaz_body_Head") + " {1:00}/{0} - {2} {3}", anno, settimana, rigaDip.Cognome, rigaDip.Nome) + aCapo + aCapo; + corpoEmail += string.Format(@"{1}", utils.obj.confReadString("baseUrl"), utils.obj.confReadString("emailBaz_body_Link")); + corpoEmail += aCapo + aCapo; + // compongo la programmazione settimanale utente... EVENTUALMENTE CON GIORNI VUOTI!!! + + progSett = getAgendDip(idxDipendente, anno, settimana); + + corpoEmail += progSett; + corpoEmail += "" + utils.obj.confReadString("emailBaz_body_Firma") + ""; + try + { + // invio email con link + resoconto breve impegno settimanale + utils.gestEmail.geAuth.mandaEmail(fromEmail, toEmail, oggettoEmail, corpoEmail); + inviate++; + } + catch + { } + + if (utils.obj.confReadBool("testMode") && inviate > 5) + { + answ = true; + return answ; + } + } + + answ = inviate > 0; // controlla che ALMENO 1 email sia stata inviata... + return answ; + } + + #endregion Public Methods } - protected Ds_ProjEts.DipendentiDataTable tabDip = new Ds_ProjEts.DipendentiDataTable(); - protected Ds_ProjEts.Dip2ATRDataTable tabD2ATR = new Ds_ProjEts.Dip2ATRDataTable(); - protected Ds_ProjEts.BazaarRisorseDataTable tabBazSingle = new Ds_ProjEts.BazaarRisorseDataTable(); - protected DS_utilsProjEts.v_selCommesseDataTable tabComm = new DS_utilsProjEts.v_selCommesseDataTable(); - /// - /// Formatta blocco impegni del dipendente x la settimana indicata - /// - /// identificativo dipendente - /// anno di riferimento - /// settimana desiderata - /// - protected string getAgendDip(int idxDipendente, int anno, int sett) - { - //default - string answ = ""; - // inizio a comporre tabella utente - answ += ""; - // recupero i dati x il dipendente corrente... - tabBazSingle = DataProxy_ProjEts.DP.taBaz.getByAnnoSettDip(anno, sett, idxDipendente); - // compongo la settimana a partire dalla data richiesta... - for (int i = 0; i < 5; i++) - { - answ += getAgendByDate(idxDipendente, anno, sett, i); - } - answ += "
"; - // restituisco risultato - return answ; - } - /// - /// Formatta blocco impegno x dipendente x una specifica data - /// - /// identificativo dipendente - /// anno di riferimento - /// settimana desiderata - /// shift (add) da applicare con base lunedì (0..4) - /// - protected string getAgendByDate(int idxDipendente, int anno, int sett, int shiftDay) - { - // variabili - string answ = ""; - DS_utilsProjEts.v_selCommesseRow rigaComm; - - // parto dal lunedì della sett indicata! - DateTime dataRif = datario.FirstDateOfWeekISO8601(anno, sett); - dataRif = dataRif.AddDays(shiftDay); - - // inserisco intestazione con data - answ += string.Format("{0:dd.MM.yyyy} {0:dddd}", dataRif).ToUpper(); - - // recupero tutte le assegnazioni x la giornata indicata (cerco alla posizione shiftDay se è != 0) - Ds_ProjEts.BazaarRisorseRow[] commGG = (Ds_ProjEts.BazaarRisorseRow[])tabBazSingle.Select(string.Format("SUBSTRING(SchemaWeek, {0}, 1) <> 0", shiftDay + 1)); - foreach (Ds_ProjEts.BazaarRisorseRow riga in commGG) - { - // recupero dati commessa... - rigaComm = (DS_utilsProjEts.v_selCommesseRow)tabComm.Select(string.Format("value = {0}", riga.idxFase))[0]; - answ += string.Format("{0} {1}", utils.trimChar(rigaComm.label, utils.obj.confReadInt("maxCharNomeComm")), riga.SchemaWeek); - } - // aggiungo spaziatura - answ += "

"; - - return answ; - } - - #endregion - } -} +} \ No newline at end of file diff --git a/ETS_Data/Ds_ProjEts.Designer.cs b/ETS_Data/Ds_ProjEts.Designer.cs index a32b7a1..a81cd30 100644 --- a/ETS_Data/Ds_ProjEts.Designer.cs +++ b/ETS_Data/Ds_ProjEts.Designer.cs @@ -21257,36 +21257,42 @@ SELECT CodTipoRisorsa, DescrTipoRisorsa, costoOrario FROM AnagTipoRisorse WHERE [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[5]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[6]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT * FROM v_Dip2ATR"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[1].Connection = this.Connection; - this._commandCollection[1].CommandText = "dbo.stp_D2ATR_getBazOrd"; + this._commandCollection[1].CommandText = "dbo.stp_D2ATR_deleteQuery"; this._commandCollection[1].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idxDipendente", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[2].Connection = this.Connection; - this._commandCollection[2].CommandText = "dbo.stp_D2ATR_getByGroup"; + this._commandCollection[2].CommandText = "dbo.stp_D2ATR_getBazOrd"; this._commandCollection[2].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Gruppo", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[3].Connection = this.Connection; - this._commandCollection[3].CommandText = "dbo.stp_D2ATR_insertMissing"; + this._commandCollection[3].CommandText = "dbo.stp_D2ATR_getByGroup"; this._commandCollection[3].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Gruppo", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[4] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[4].Connection = this.Connection; - this._commandCollection[4].CommandText = "dbo.stp_D2ATR_updateQuery"; + this._commandCollection[4].CommandText = "dbo.stp_D2ATR_insertMissing"; this._commandCollection[4].CommandType = global::System.Data.CommandType.StoredProcedure; this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idxDipendente", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodTipoRisorsa", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Gruppo", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@GrpOrder", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[5].Connection = this.Connection; + this._commandCollection[5].CommandText = "dbo.stp_D2ATR_updateQuery"; + this._commandCollection[5].CommandType = global::System.Data.CommandType.StoredProcedure; + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idxDipendente", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CodTipoRisorsa", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Gruppo", global::System.Data.SqlDbType.NVarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@GrpOrder", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -21318,7 +21324,7 @@ SELECT CodTipoRisorsa, DescrTipoRisorsa, costoOrario FROM AnagTipoRisorse WHERE [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual Ds_ProjEts.Dip2ATRDataTable getBazOrd() { - this.Adapter.SelectCommand = this.CommandCollection[1]; + this.Adapter.SelectCommand = this.CommandCollection[2]; Ds_ProjEts.Dip2ATRDataTable dataTable = new Ds_ProjEts.Dip2ATRDataTable(); this.Adapter.Fill(dataTable); return dataTable; @@ -21329,7 +21335,7 @@ SELECT CodTipoRisorsa, DescrTipoRisorsa, costoOrario FROM AnagTipoRisorse WHERE [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual Ds_ProjEts.Dip2ATRDataTable GetByGroup(string Gruppo) { - this.Adapter.SelectCommand = this.CommandCollection[2]; + this.Adapter.SelectCommand = this.CommandCollection[3]; if ((Gruppo == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } @@ -21346,7 +21352,7 @@ SELECT CodTipoRisorsa, DescrTipoRisorsa, costoOrario FROM AnagTipoRisorse WHERE [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual Ds_ProjEts.Dip2ATRDataTable updateQuery(global::System.Nullable Original_idxDipendente, string CodTipoRisorsa, string Gruppo, global::System.Nullable GrpOrder) { - this.Adapter.SelectCommand = this.CommandCollection[4]; + this.Adapter.SelectCommand = this.CommandCollection[5]; if ((Original_idxDipendente.HasValue == true)) { this.Adapter.SelectCommand.Parameters[1].Value = ((int)(Original_idxDipendente.Value)); } @@ -21376,11 +21382,39 @@ SELECT CodTipoRisorsa, DescrTipoRisorsa, costoOrario FROM AnagTipoRisorse WHERE return dataTable; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int deleteQuery(global::System.Nullable Original_idxDipendente) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[1]; + if ((Original_idxDipendente.HasValue == true)) { + command.Parameters[1].Value = ((int)(Original_idxDipendente.Value)); + } + else { + command.Parameters[1].Value = global::System.DBNull.Value; + } + global::System.Data.ConnectionState previousConnectionState = command.Connection.State; + if (((command.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + command.Connection.Open(); + } + int returnValue; + try { + returnValue = command.ExecuteNonQuery(); + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + command.Connection.Close(); + } + } + return returnValue; + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int insertMissing() { - global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[3]; + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[4]; global::System.Data.ConnectionState previousConnectionState = command.Connection.State; if (((command.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { diff --git a/ETS_Data/Ds_ProjEts.xsd b/ETS_Data/Ds_ProjEts.xsd index 24ce5a8..0c3cbb5 100644 --- a/ETS_Data/Ds_ProjEts.xsd +++ b/ETS_Data/Ds_ProjEts.xsd @@ -977,6 +977,17 @@ SELECT CodTipoRisorsa, DescrTipoRisorsa, costoOrario FROM AnagTipoRisorse WHERE + + + + dbo.stp_D2ATR_deleteQuery + + + + + + + @@ -2026,7 +2037,7 @@ ORDER BY OrdGruppo - + @@ -2069,7 +2080,7 @@ ORDER BY OrdGruppo - + @@ -2119,7 +2130,7 @@ ORDER BY OrdGruppo - + @@ -2215,7 +2226,7 @@ ORDER BY OrdGruppo - + @@ -2266,7 +2277,7 @@ ORDER BY OrdGruppo - + @@ -2318,7 +2329,7 @@ ORDER BY OrdGruppo - + @@ -2421,7 +2432,7 @@ ORDER BY OrdGruppo - + @@ -2469,7 +2480,7 @@ ORDER BY OrdGruppo - + @@ -2486,7 +2497,7 @@ ORDER BY OrdGruppo - + @@ -2507,7 +2518,7 @@ ORDER BY OrdGruppo - + @@ -2552,7 +2563,7 @@ ORDER BY OrdGruppo - + @@ -2687,7 +2698,7 @@ ORDER BY OrdGruppo - + @@ -2706,7 +2717,7 @@ ORDER BY OrdGruppo - + @@ -2717,7 +2728,7 @@ ORDER BY OrdGruppo - + @@ -2733,7 +2744,7 @@ ORDER BY OrdGruppo - + @@ -2762,7 +2773,7 @@ ORDER BY OrdGruppo - + @@ -2782,7 +2793,7 @@ ORDER BY OrdGruppo - + @@ -2796,7 +2807,7 @@ ORDER BY OrdGruppo - + @@ -2811,7 +2822,7 @@ ORDER BY OrdGruppo - + @@ -2827,7 +2838,7 @@ ORDER BY OrdGruppo - + @@ -2926,7 +2937,7 @@ ORDER BY OrdGruppo - + @@ -3049,13 +3060,13 @@ ORDER BY OrdGruppo - - - - - - - + + + + + + + \ No newline at end of file diff --git a/ETS_Data/Ds_ProjEts.xss b/ETS_Data/Ds_ProjEts.xss index a379c6e..ee4d197 100644 --- a/ETS_Data/Ds_ProjEts.xss +++ b/ETS_Data/Ds_ProjEts.xss @@ -4,7 +4,7 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + @@ -15,7 +15,7 @@ - + diff --git a/ETS_Data/SQL/ETS_PROJ/ETS_PROJ_2110.sql b/ETS_Data/SQL/ETS_PROJ/ETS_PROJ_2110.sql index 9291967..8d33f54 100644 --- a/ETS_Data/SQL/ETS_PROJ/ETS_PROJ_2110.sql +++ b/ETS_Data/SQL/ETS_PROJ/ETS_PROJ_2110.sql @@ -321,6 +321,11 @@ RETURN GO + +insert into AnagTipoRisorse(CodTipoRisorsa, DescrTipoRisorsa, costoOrario) +VALUES ('ND', 'NON ASSEGNATO', 40) +GO + /********************************************************** * STORED stp_D2ATR_insertMissing * @@ -338,11 +343,11 @@ WITH cteNewUser AS SELECT D.idxDipendente FROM Dipendenti D LEFT OUTER JOIN Dip2ATR D2A ON D.idxDipendente = D2A.idxDipendente - WHERE D2A.idxDipendente IS NULL + WHERE D.gruppo = 'ETS' AND D2A.idxDipendente IS NULL ) INSERT INTO Dip2ATR(idxDipendente, CodTipoRisorsa, Gruppo, GrpOrder) -SELECT idxDipendente, 'DIS', 'ZZZ', 999 +SELECT idxDipendente, 'ND', 'ZZZ', 999 FROM cteNewUser RETURN @@ -356,3 +361,23 @@ ALTER TABLE Dip2ATR ADD CONSTRAINT PK_Dip2ATR PRIMARY KEY (idxDipendente) GO +/********************************************************** +* STORED stp_D2ATR_deleteQuery +* +* eliminazione dipentente NON gestito in Bazaar +* +* mod: S.E.L. 2021.10.19 release +* +**********************************************************/ +create PROCEDURE [dbo].[stp_D2ATR_deleteQuery] +( + @Original_idxDipendente INT = 0 +) +AS + +DELETE +FROM Dip2ATR +WHERE idxDipendente = @Original_idxDipendente + +RETURN +GO diff --git a/ETS_Data/obj/Debug/TempPE/Ds_ProjEts.Designer.cs.dll b/ETS_Data/obj/Debug/TempPE/Ds_ProjEts.Designer.cs.dll index e53f31b..f1cf9c1 100644 Binary files a/ETS_Data/obj/Debug/TempPE/Ds_ProjEts.Designer.cs.dll and b/ETS_Data/obj/Debug/TempPE/Ds_ProjEts.Designer.cs.dll differ diff --git a/PROJ-ETS/PROJ-ETS/BazaarGroups.aspx b/PROJ-ETS/PROJ-ETS/BazaarGroups.aspx index daf25e7..a2d8cd8 100644 --- a/PROJ-ETS/PROJ-ETS/BazaarGroups.aspx +++ b/PROJ-ETS/PROJ-ETS/BazaarGroups.aspx @@ -10,20 +10,7 @@
- - - - - - gestione gruppi: -
    -
  • Anagrafica gruppi EDIT
  • -
  • Anagrafica gruppi SELECT --> detail utenti
  • -
  • Anagrafica gruppi ADD
  • -
  • Anagrafica gruppi DELETE
  • -
  • Sync utenti
  • -
  • Edit Assegnazione utenti-Gruppi
  • -
+
\ No newline at end of file diff --git a/PROJ-ETS/PROJ-ETS/BazaarGroups.aspx.cs b/PROJ-ETS/PROJ-ETS/BazaarGroups.aspx.cs index 634e9dd..ae5f5c9 100644 --- a/PROJ-ETS/PROJ-ETS/BazaarGroups.aspx.cs +++ b/PROJ-ETS/PROJ-ETS/BazaarGroups.aspx.cs @@ -11,6 +11,11 @@ namespace PROJ_ETS { #region Private Methods + private void Mod_Dip2Atr_eh_Updated(object sender, EventArgs e) + { + mod_GroupsMan.doUpdate(); + } + private void Mod_GroupsMan_eh_Reset(object sender, EventArgs e) { mod_Dip2Atr.Gruppo = "#"; @@ -36,6 +41,7 @@ namespace PROJ_ETS } mod_GroupsMan.eh_Select += Mod_GroupsMan_eh_Select; mod_GroupsMan.eh_Reset += Mod_GroupsMan_eh_Reset; + mod_Dip2Atr.eh_Updated += Mod_Dip2Atr_eh_Updated; } #endregion Protected Methods diff --git a/PROJ-ETS/PROJ-ETS/BazaarGroups.aspx.designer.cs b/PROJ-ETS/PROJ-ETS/BazaarGroups.aspx.designer.cs index 3db8da5..fb36571 100644 --- a/PROJ-ETS/PROJ-ETS/BazaarGroups.aspx.designer.cs +++ b/PROJ-ETS/PROJ-ETS/BazaarGroups.aspx.designer.cs @@ -32,15 +32,6 @@ namespace PROJ_ETS /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl divDetail; - /// - /// updDip2ATR control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.UpdatePanel updDip2ATR; - /// /// mod_Dip2Atr control. /// diff --git a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_Dip2Atr.ascx b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_Dip2Atr.ascx index 02f7434..4d577ed 100644 --- a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_Dip2Atr.ascx +++ b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_Dip2Atr.ascx @@ -25,32 +25,51 @@ - <%-- + + - + - --%> - - + + + + + + + + + + + + + + + + - + + + + + - - \ No newline at end of file + + + \ No newline at end of file diff --git a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_Dip2Atr.ascx.cs b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_Dip2Atr.ascx.cs index 6aff982..29e6cf7 100644 --- a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_Dip2Atr.ascx.cs +++ b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_Dip2Atr.ascx.cs @@ -9,6 +9,12 @@ namespace PROJ_ETS.WebUserControls { public partial class mod_Dip2Atr : System.Web.UI.UserControl { + #region Public Events + + public event EventHandler eh_Updated; + + #endregion Public Events + #region Public Properties public string Gruppo @@ -26,6 +32,18 @@ namespace PROJ_ETS.WebUserControls #endregion Public Properties + #region Private Methods + + private void reportUpdate() + { + if (eh_Updated != null) + { + eh_Updated(this, new EventArgs()); + } + } + + #endregion Private Methods + #region Protected Methods protected void lbtReset_Click(object sender, EventArgs e) @@ -34,6 +52,16 @@ namespace PROJ_ETS.WebUserControls grView.DataBind(); } + protected void ods_Deleted(object sender, ObjectDataSourceStatusEventArgs e) + { + reportUpdate(); + } + + protected void ods_Updated(object sender, ObjectDataSourceStatusEventArgs e) + { + reportUpdate(); + } + protected void Page_Load(object sender, EventArgs e) { } diff --git a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_Dip2Atr.ascx.designer.cs b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_Dip2Atr.ascx.designer.cs index 70aa616..d7c4d06 100644 --- a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_Dip2Atr.ascx.designer.cs +++ b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_Dip2Atr.ascx.designer.cs @@ -40,5 +40,23 @@ namespace PROJ_ETS.WebUserControls /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.HiddenField hfGruppo; + + /// + /// odsTipoRis control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource odsTipoRis; + + /// + /// odsGruppo control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource odsGruppo; } } diff --git a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_GroupsMan.ascx b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_GroupsMan.ascx index e376fa0..29cf96f 100644 --- a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_GroupsMan.ascx +++ b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_GroupsMan.ascx @@ -31,6 +31,11 @@ + + + + + diff --git a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_GroupsMan.ascx.cs b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_GroupsMan.ascx.cs index d5cca2e..5bb019d 100644 --- a/PROJ-ETS/PROJ-ETS/WebUserControls/mod_GroupsMan.ascx.cs +++ b/PROJ-ETS/PROJ-ETS/WebUserControls/mod_GroupsMan.ascx.cs @@ -1,4 +1,5 @@ -using System; +using ETS_Data; +using System; using System.Collections.Generic; using System.Linq; using System.Web; @@ -49,10 +50,32 @@ namespace PROJ_ETS.WebUserControls } } + protected void lbtUserSync_Click(object sender, EventArgs e) + { + // chiama import missing + DataProxy_ProjEts.DP.taD2ATR.insertMissing(); + // reset gridview... + grView.SelectedIndex = -1; + grView.DataBind(); + if (eh_Reset != null) + { + eh_Reset(this, new EventArgs()); + } + } + protected void Page_Load(object sender, EventArgs e) { } #endregion Protected Methods + + #region Internal Methods + + internal void doUpdate() + { + grView.DataBind(); + } + + #endregion Internal Methods } } \ No newline at end of file diff --git a/PROJ-ETS/PROJ-ETS/bin/ETS_Data.dll b/PROJ-ETS/PROJ-ETS/bin/ETS_Data.dll index 1c077a4..f1a3e11 100644 Binary files a/PROJ-ETS/PROJ-ETS/bin/ETS_Data.dll and b/PROJ-ETS/PROJ-ETS/bin/ETS_Data.dll differ diff --git a/PROJ-ETS/PROJ-ETS/bin/PROJ-ETS.dll b/PROJ-ETS/PROJ-ETS/bin/PROJ-ETS.dll index abed843..124c8f2 100644 Binary files a/PROJ-ETS/PROJ-ETS/bin/PROJ-ETS.dll and b/PROJ-ETS/PROJ-ETS/bin/PROJ-ETS.dll differ