diff --git a/GPW_Admin/WebUserControls/mod_adminOrario.ascx b/GPW_Admin/WebUserControls/mod_adminOrario.ascx index 2b706df..2cac8bf 100644 --- a/GPW_Admin/WebUserControls/mod_adminOrario.ascx +++ b/GPW_Admin/WebUserControls/mod_adminOrario.ascx @@ -35,7 +35,7 @@ - + diff --git a/GPW_Admin/WebUserControls/mod_commAttivitaDesk.ascx b/GPW_Admin/WebUserControls/mod_commAttivitaDesk.ascx index 54c2cf9..e5d6d51 100644 --- a/GPW_Admin/WebUserControls/mod_commAttivitaDesk.ascx +++ b/GPW_Admin/WebUserControls/mod_commAttivitaDesk.ascx @@ -4,222 +4,102 @@ <%@ Register Src="mod_autocomplete.ascx" TagPrefix="uc2" TagName="mod_autocomplete" %> <% if (false) - { %> + { %> <% } %> - - - -
- -
-
-
- - - - - - - - - - - - - -
+ +
+ + +
+ +
+
+
+ + + + + + + Nessun record COMMESSA -
- - - - - - - - - - - - - - - -
- -
-
-
- - | - -
-
- -
+ + + + +
+
+
+ + | +
-
-
- - - +
+ +
+
+
+
+ + - -
-
- - h -
-
-
-
- +
+ + h
-
-
-
-
-
-
- -
-
-
- -
-
-
-
- <%--
- --%> -
-
-
- -
-
- -
-
-  

descrizione: -
-
- -
-
- +
+
+
-
- - -
-
-
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- -
-
- -
-
-  

descrizione: -
-
- -
-
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
- + \ No newline at end of file diff --git a/GPW_Admin/WebUserControls/mod_commAttivitaDesk.ascx.designer.cs b/GPW_Admin/WebUserControls/mod_commAttivitaDesk.ascx.designer.cs index f7dc77d..0c23fa1 100644 --- a/GPW_Admin/WebUserControls/mod_commAttivitaDesk.ascx.designer.cs +++ b/GPW_Admin/WebUserControls/mod_commAttivitaDesk.ascx.designer.cs @@ -1,86 +1,88 @@ //------------------------------------------------------------------------------ -// -// This code was generated by a tool. +// +// Codice generato da uno strumento. // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// +// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se +// il codice viene rigenerato. +// //------------------------------------------------------------------------------ -namespace GPW_Admin.WebUserControls { - - - public partial class mod_commAttivitaDesk { - +namespace GPW_Admin.WebUserControls +{ + + + public partial class mod_commAttivitaDesk + { + /// - /// pnlAll control. + /// Controllo pnlAll. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.Panel pnlAll; - + /// - /// pnlHeader control. + /// Controllo pnlHeader. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.Panel pnlHeader; - + /// - /// lblTitle control. + /// Controllo lblTitle. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.Label lblTitle; - + /// - /// imgBtnNew control. + /// Controllo imgBtnNew. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.ImageButton imgBtnNew; - + /// - /// grView control. + /// Controllo grView. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.GridView grView; - + /// - /// odsRA control. + /// Controllo odsRA. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.ObjectDataSource odsRA; - + /// - /// odsProgetto control. + /// Controllo odsProgetto. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.ObjectDataSource odsProgetto; - + /// - /// odsFase control. + /// Controllo odsFase. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.ObjectDataSource odsFase; } diff --git a/GPW_Admin/WebUserControls/mod_elencoTimbr.ascx b/GPW_Admin/WebUserControls/mod_elencoTimbr.ascx index 6db1a1c..53b6420 100644 --- a/GPW_Admin/WebUserControls/mod_elencoTimbr.ascx +++ b/GPW_Admin/WebUserControls/mod_elencoTimbr.ascx @@ -1,27 +1,17 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_elencoTimbr.ascx.cs" Inherits="GPW_Admin.WebUserControls.mod_elencoTimbr" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> <% if (false) - { %> + { %> <% } %> - - - - - - - - - - - - + + + + + + -
- Nessun record TIMBRATURA -
+ Nessun record TIMBRATURA
@@ -52,8 +42,7 @@
- + TargetControlID="btnSwapInOut">
@@ -71,12 +60,14 @@ -
+ + + + <%--
- -
+ TargetControlID="lbDelete"> +
--%>
@@ -96,4 +87,4 @@ - + \ No newline at end of file diff --git a/GPW_Admin/WebUserControls/mod_elencoTimbr.ascx.cs b/GPW_Admin/WebUserControls/mod_elencoTimbr.ascx.cs index 5841598..c66da86 100644 --- a/GPW_Admin/WebUserControls/mod_elencoTimbr.ascx.cs +++ b/GPW_Admin/WebUserControls/mod_elencoTimbr.ascx.cs @@ -9,108 +9,29 @@ using SteamWare; namespace GPW_Admin.WebUserControls { - public partial class mod_elencoTimbr : System.Web.UI.UserControl + public partial class mod_elencoTimbr : BaseUserControl { - protected void Page_Load(object sender, EventArgs e) - { - - } + #region Public Events /// /// evento update valori /// public event EventHandler eh_nuovoValore; - /// - /// evento update righe - /// - /// - /// - protected void grView_RowUpdated(object sender, GridViewUpdatedEventArgs e) - { - grView.DataBind(); - raiseUpdate(); - } - private void raiseUpdate() - { - // sollevo evento nuovo valore... - if (eh_nuovoValore != null) - { - eh_nuovoValore(this, new EventArgs()); - } - } - /// - /// evento cancellazione riga - /// - /// - /// - protected void grView_RowDeleted(object sender, GridViewDeletedEventArgs e) - { - grView.DataBind(); - raiseUpdate(); - } - /// - /// imposto ODS - /// - private void checkFixOds() - { - ods.DataBind(); - grView.DataBind(); - } + #endregion Public Events + + #region Public Properties - public void doUpdate() - { - checkFixOds(); - } /// - /// calcola cognome-nome da idx + /// determina se sia visibile formato data estesa /// - /// - /// - public string cognomeNome(object idxDip) - { - string answ = ""; - try - { - DS_Applicazione.DipendentiRow rigaDip = DataProxy.DP.taDipendenti.getByIdx(Convert.ToInt32(idxDip))[0]; - answ = string.Format("{0} {1}", rigaDip.Cognome, rigaDip.Nome); - } - catch - { } - return answ; - } + public bool showLongDateFormat { get; set; } + /// - /// inverte valore booleano + /// determina se sia visibile username /// - /// - /// - public bool invBool(object valore) - { - bool answ = true; - try - { - answ = !Convert.ToBoolean(valore); - } - catch - { } - return answ; - } - /// - /// converte valore in booleano - /// - /// - /// - public bool toBool(object valore) - { - bool answ = true; - try - { - answ = Convert.ToBoolean(valore); - } - catch - { } - return answ; - } + public bool showUserName { get; set; } + /// /// verifica se l'utente possa approvare la modifica oraria /// @@ -128,6 +49,120 @@ namespace GPW_Admin.WebUserControls return answ; } } + + #endregion Public Properties + + #region Private Methods + + /// + /// imposto ODS + /// + private void checkFixOds() + { + ods.DataBind(); + grView.DataBind(); + } + + private void raiseUpdate() + { + // sollevo evento nuovo valore... + if (eh_nuovoValore != null) + { + eh_nuovoValore(this, new EventArgs()); + } + } + + #endregion Private Methods + + #region Protected Methods + + /// + /// evento cancellazione riga + /// + /// + /// + protected void grView_RowDeleted(object sender, GridViewDeletedEventArgs e) + { + grView.DataBind(); + raiseUpdate(); + } + + /// + /// evento update righe + /// + /// + /// + protected void grView_RowUpdated(object sender, GridViewUpdatedEventArgs e) + { + grView.DataBind(); + raiseUpdate(); + } + + protected void Page_Load(object sender, EventArgs e) + { + } + + #endregion Protected Methods + + #region Public Methods + + /// + /// calcola cognome-nome da idx + /// + /// + /// + public string cognomeNome(object idxDip) + { + string answ = ""; + try + { + DS_Applicazione.DipendentiRow rigaDip = DataProxy.DP.taDipendenti.getByIdx(Convert.ToInt32(idxDip))[0]; + answ = string.Format("{0} {1}", rigaDip.Cognome, rigaDip.Nome); + } + catch + { } + return answ; + } + + public void doUpdate() + { + checkFixOds(); + } + + /// + /// inverte valore booleano + /// + /// + /// + public bool invBool(object valore) + { + bool answ = true; + try + { + answ = !Convert.ToBoolean(valore); + } + catch + { } + return answ; + } + + /// + /// converte valore in booleano + /// + /// + /// + public bool toBool(object valore) + { + bool answ = true; + try + { + answ = Convert.ToBoolean(valore); + } + catch + { } + return answ; + } + /// /// verifica se l'utente possa eliminare il record: /// - se non approvato @@ -143,16 +178,9 @@ namespace GPW_Admin.WebUserControls catch { } return answ; - } - /// - /// determina se sia visibile username - /// - public bool showUserName { get; set; } + } + #endregion Public Methods - /// - /// determina se sia visibile formato data estesa - /// - public bool showLongDateFormat { get; set; } } } \ No newline at end of file diff --git a/GPW_Admin/WebUserControls/mod_reviewTimbrature.ascx b/GPW_Admin/WebUserControls/mod_reviewTimbrature.ascx index a4fbe7b..853b420 100644 --- a/GPW_Admin/WebUserControls/mod_reviewTimbrature.ascx +++ b/GPW_Admin/WebUserControls/mod_reviewTimbrature.ascx @@ -1,34 +1,32 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_reviewTimbrature.ascx.cs" Inherits="GPW_Admin.WebUserControls.mod_reviewTimbrature" %> <%@ Register Src="mod_filtro.ascx" TagName="mod_filtro" TagPrefix="uc1" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> -<%@ Register Src="mod_periodoAnalisi.ascx" TagName="mod_periodoAnalisi" TagPrefix="uc2" %> <%@ Register Src="mod_elencoTimbr.ascx" TagName="mod_elencoTimbr" TagPrefix="uc3" %> <%@ Register Src="mod_commAttivitaDesk.ascx" TagName="mod_commAttivitaDesk" TagPrefix="uc4" %> +<%@ Register Src="~/WebUserControls/cmp_periodoAnalisi.ascx" TagPrefix="uc1" TagName="cmp_periodoAnalisi" %> -
-
-
- - -
-
- -
-
- -
-
- -
+
+
+ +
-
- - +
+ +
+
+ +
+
+ +
+
+ +
-
-
+
+
@@ -38,23 +36,19 @@ Nessun record trovato - + - + - + - - + + @@ -127,7 +121,7 @@ - +
@@ -178,29 +172,23 @@
-
+
-

Timbrature e Giustificativi

-
-
+
+
+

Timbrature e Giustificativi


- - - - - - - - - - - + CssClass="table table-sm table-striped" Visible="False"> + + + + + -
+
Nessun GIUSTIFICATIVO attivo:
@@ -316,17 +304,14 @@ - +
-
-

Record Commesse

-
-
- +
+

Record Commesse

+
-
+
\ No newline at end of file diff --git a/GPW_Admin/WebUserControls/mod_reviewTimbrature.ascx.cs b/GPW_Admin/WebUserControls/mod_reviewTimbrature.ascx.cs index e29da7a..858593e 100644 --- a/GPW_Admin/WebUserControls/mod_reviewTimbrature.ascx.cs +++ b/GPW_Admin/WebUserControls/mod_reviewTimbrature.ascx.cs @@ -14,36 +14,8 @@ namespace GPW_Admin.WebUserControls { public partial class mod_reviewTimbrature : BaseUserControl { + #region Protected Properties - /// - /// caricamento pagina - /// - /// - /// - protected void Page_Load(object sender, EventArgs e) - { - grViewExpl.PageSize = utils.pageSize; - if (!Page.IsPostBack) - { - // imposto intervallo date...1 mese... - intervalloDate date = new intervalloDate(); - date.fine = DateTime.Now.Date.AddDays(1); - date.inizio = date.fine.AddMonths(-1); - mod_periodoAnalisi1.intervalloAnalisi = date; - // altri fix - filtroDip.ods = odsDip; - memLayer.ML.emptySessionVal("idxDip_sel"); - memLayer.ML.setSessionVal("maxErrMin", memLayer.ML.confReadInt("maxErrMin")); - memLayer.ML.setSessionVal("maxErrPlus", memLayer.ML.confReadInt("maxErrPlus")); - filtroDip.reselFirst(); - setDetailVisib(false); - // determino visibilità link export... - hlExport.Visible = memLayer.ML.cdvb("ExportORE_SPS"); - hlExportComm.Visible = memLayer.ML.cdvb("ExportCommesse"); - } - filtroDip.eh_selValore += new EventHandler(filtroDip_eh_selValore); - mod_elencoTimbr1.eh_nuovoValore += new EventHandler(mod_elencoTimbr1_eh_nuovoValore); - } /// /// valore selezionato x dettaglio giornaliero utente /// @@ -66,65 +38,6 @@ namespace GPW_Admin.WebUserControls } } - void mod_elencoTimbr1_eh_nuovoValore(object sender, EventArgs e) - { - checkFixOds(); - } - /// - /// seleziono - /// - /// - /// - void filtroDip_eh_selValore(object sender, EventArgs e) - { - // imposto ods - grViewExpl.SelectedIndex = -1; - setDetailVisib(false); - checkFixOds(); - } - /// - /// imposto ODS - /// - private void checkFixOds() - { - memLayer.ML.setSessionVal("idxDip_sel", filtroDip.valoreInt); - grViewExpl.DataBind(); - mod_elencoTimbr1.doUpdate(); - } - /// - /// calcola cognome-nome da idx - /// - /// - /// - public string cognomeNome(object idxDip) - { - string answ = ""; - try - { - DS_Applicazione.DipendentiRow rigaDip = DataProxy.DP.taDipendenti.getByIdx(Convert.ToInt32(idxDip))[0]; - answ = string.Format("{0} {1}", rigaDip.Cognome, rigaDip.Nome); - } - catch - { } - return answ; - } - /// - /// verifica se l'utente possa approvare la modifica oraria - /// - public bool userCanApprove - { - get - { - bool answ = false; - try - { - answ = user_std.UtSn.userHasRight("GPW_admin"); - } - catch - { } - return answ; - } - } /// /// idx dipendente loggato /// @@ -142,38 +55,192 @@ namespace GPW_Admin.WebUserControls return idx; } } + + #endregion Protected Properties + + #region Public Properties + /// - /// inverte valore booleano + /// determina se si debba mostrare cognome nome (altrimenti IDX anonimo) /// - /// - /// - public bool invBool(object valore) + public bool showCognomeNome { - bool answ = true; - try + get { - answ = !Convert.ToBoolean(valore); + return memLayer.ML.confReadBool("reviewShowCN"); } - catch - { } - return answ; } + /// - /// converte valore in booleano + /// verifica se l'utente possa approvare la modifica oraria /// - /// - /// - public bool toBool(object valore) + public bool userCanApprove { - bool answ = true; - try + get { - answ = Convert.ToBoolean(valore); + bool answ = false; + try + { + answ = user_std.UtSn.userHasRight("GPW_admin"); + } + catch + { } + return answ; } - catch - { } - return answ; } + + #endregion Public Properties + + #region Private Methods + + /// + /// imposto ODS + /// + private void checkFixOds() + { + memLayer.ML.setSessionVal("idxDip_sel", filtroDip.valoreInt); + grViewExpl.DataBind(); + mod_elencoTimbr1.doUpdate(); + } + + /// + /// seleziono + /// + /// + /// + private void filtroDip_eh_selValore(object sender, EventArgs e) + { + // imposto ods + grViewExpl.SelectedIndex = -1; + setDetailVisib(false); + checkFixOds(); + } + + private void mod_elencoTimbr1_eh_nuovoValore(object sender, EventArgs e) + { + checkFixOds(); + } + + /// + /// set visibilità grView dettagli + /// + /// + private void setDetailVisib(bool value) + { + pnlDettagli.Visible = value; + //mod_elencoTimbr1.Visible = value; + grViewGiust.Visible = value; + } + + /// + /// aggiorna i 3 datagrid + /// + private void updateVisual() + { + // aggiorno visualizzazioni + grViewExpl.DataBind(); + mod_elencoTimbr1.doUpdate(); + grViewGiust.DataBind(); + } + + #endregion Private Methods + + #region Protected Methods + + /// + /// inserisce un giust nuovo x dipendente/data + /// + /// + /// + protected void btNewGiust_Click(object sender, EventArgs e) + { + int idxDip = memLayer.ML.IntSessionObj("idxDip_det"); + // calcola ed inserisce giustificativi + DataProxy.DP.taGiust.giustInsByDate(idxDip, dataRif, "PERM"); + updateVisual(); + } + + /// + /// gestione evento richiesta nuovo valore (mostra footer, ...) + /// + /// + /// + protected void btnNew_Click(object sender, EventArgs e) + { + // reset selezione... + resetSelezioneGiust(); + + int idxDip = memLayer.ML.IntSessionObj("idxDip_det"); + // calcola ed inserisce giustificativi + DataProxy.DP.taGiust.giustInsByDate(idxDip, dataRif, "PERM"); + updateVisual(); + } + + /// + /// reset della selezione + /// + /// + /// + protected void btnReset_Click(object sender, EventArgs e) + { + resetSelezione(); + } + + /// + /// reset della selezione + /// + /// + /// + protected void btnResetGiust_Click(object sender, EventArgs e) + { + resetSelezioneGiust(); + } + + /// + /// ricalcola giornate periodo visualizzato per i dipendenti selezionati + /// + /// + /// + protected void btnRicalcPeriodo_Click(object sender, EventArgs e) + { + // eseguo la stored di update dato condizione di filtro x periodo e dipendente... + DataProxy.DP.taTimbExpl.stp_ricalcolaTimbExpl_byPeriodoUser(memLayer.ML.IntSessionObj("idxDip_sel"), Convert.ToDateTime(memLayer.ML.objSessionObj("_inizio")), Convert.ToDateTime(memLayer.ML.objSessionObj("_fine"))); + DataProxy.DP.taRA.stp_ricalcolaRegAttivitaExpl_byPeriodoUser(memLayer.ML.IntSessionObj("idxDip_sel"), Convert.ToDateTime(memLayer.ML.objSessionObj("_inizio")), Convert.ToDateTime(memLayer.ML.objSessionObj("_fine"))); + // aggiorno + checkFixOds(); + } + + /// + /// cambia stato visibilità week-end... + /// + /// + /// + protected void chkWE_CheckedChanged(object sender, EventArgs e) + { + // imposto ods + checkFixOds(); + } + + /// + /// evento cancellazione riga + /// + /// + /// + protected void grView_RowDeleted(object sender, GridViewDeletedEventArgs e) + { + grViewExpl.DataBind(); + } + + /// + /// evento update righe + /// + /// + /// + protected void grView_RowUpdated(object sender, GridViewUpdatedEventArgs e) + { + grViewExpl.DataBind(); + } + /// /// mostro visualizzazione dati di dettaglio! /// @@ -199,54 +266,89 @@ namespace GPW_Admin.WebUserControls grViewExpl.DataBind(); } + /// - /// set visibilità grView dettagli - /// - /// - private void setDetailVisib(bool value) - { - pnlDettagli.Visible = value; - //mod_elencoTimbr1.Visible = value; - grViewGiust.Visible = value; - } - /// - /// reset della selezione + /// annulla inserimento nuovo valore da footer /// /// /// - protected void btnReset_Click(object sender, EventArgs e) + protected void lblCanc_click(object sender, EventArgs e) { - resetSelezione(); + // annullo inserimento: nascondo footer, bind controlli... + grViewGiust.FooterRow.Visible = false; } + /// - /// resetta la selezione dei valori in caso di modifiche su altri controlli - /// - public void resetSelezione() - { - grViewExpl.SelectedIndex = -1; - grViewExpl.DataBind(); - setDetailVisib(false); - } - /// - /// evento update righe + /// inserisce nuovo valore da footer /// /// /// - protected void grView_RowUpdated(object sender, GridViewUpdatedEventArgs e) + protected void lblIns_click(object sender, EventArgs e) { - grViewExpl.DataBind(); + // click su inserimento, chiamo il metodo insert dell'ObjectDataSource + odsGiust.Insert(); } + /// - /// evento cancellazione riga + /// aggiornamento x delete /// /// /// - protected void grView_RowDeleted(object sender, GridViewDeletedEventArgs e) + protected void odsGiust_Deleted(object sender, ObjectDataSourceStatusEventArgs e) { - grViewExpl.DataBind(); + updateVisual(); } + + protected void odsGiust_Inserting(object sender, ObjectDataSourceMethodEventArgs e) + { + } + /// - /// + /// aggiornamento x update + /// + /// + /// + protected void odsGiust_Updated(object sender, ObjectDataSourceStatusEventArgs e) + { + updateVisual(); + } + + /// + /// caricamento pagina + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + grViewExpl.PageSize = utils.pageSize; + if (!Page.IsPostBack) + { + // imposto intervallo date...1 mese... + intervalloDate date = new intervalloDate(); + date.fine = DateTime.Now.Date.AddDays(1); + date.inizio = date.fine.AddMonths(-1); + cmp_periodoAnalisi.intervalloAnalisi = date; + // altri fix + filtroDip.ods = odsDip; + memLayer.ML.emptySessionVal("idxDip_sel"); + memLayer.ML.setSessionVal("maxErrMin", memLayer.ML.confReadInt("maxErrMin")); + memLayer.ML.setSessionVal("maxErrPlus", memLayer.ML.confReadInt("maxErrPlus")); + filtroDip.reselFirst(); + setDetailVisib(false); + // determino visibilità link export... + hlExport.Visible = memLayer.ML.cdvb("ExportORE_SPS"); + hlExportComm.Visible = memLayer.ML.cdvb("ExportCommesse"); + } + filtroDip.eh_selValore += new EventHandler(filtroDip_eh_selValore); + mod_elencoTimbr1.eh_nuovoValore += new EventHandler(mod_elencoTimbr1_eh_nuovoValore); + } + + #endregion Protected Methods + + #region Public Methods + + /// + /// /// /// /// @@ -264,169 +366,25 @@ namespace GPW_Admin.WebUserControls { } return answ; } + /// - /// prepara tooltip permessi/straordinarie + /// calcola cognome-nome da idx /// - /// - /// - /// + /// /// - public string tooltipPermStra(object minStra, object minPerm, object minMpp) + public string cognomeNome(object idxDip) { string answ = ""; try { - answ = string.Format("Straordinarie: {0:0.##} min, Permessi: {1:0.##} min", minStra, minPerm); - if (Convert.ToInt32(minMpp) > 0) - { - answ += string.Format(", Pranzo: {0:0.##} min", minMpp); - } + DS_Applicazione.DipendentiRow rigaDip = DataProxy.DP.taDipendenti.getByIdx(Convert.ToInt32(idxDip))[0]; + answ = string.Format("{0} {1}", rigaDip.Cognome, rigaDip.Nome); } catch { } return answ; } - #region editing giustificativi - - - /// - /// resetta la selezione dei valori in caso di modifiche su altri controlli - /// - public void resetSelezioneGiust() - { - grViewGiust.SelectedIndex = -1; - grViewGiust.DataBind(); - } - /// - /// reset della selezione - /// - /// - /// - protected void btnResetGiust_Click(object sender, EventArgs e) - { - resetSelezioneGiust(); - } - /// - /// gestione evento richiesta nuovo valore (mostra footer, ...) - /// - /// - /// - protected void btnNew_Click(object sender, EventArgs e) - { - // reset selezione... - resetSelezioneGiust(); - - int idxDip = memLayer.ML.IntSessionObj("idxDip_det"); - // calcola ed inserisce giustificativi - DataProxy.DP.taGiust.giustInsByDate(idxDip, dataRif, "PERM"); - updateVisual(); - } - /// - /// inserisce nuovo valore da footer - /// - /// - /// - protected void lblIns_click(object sender, EventArgs e) - { - // click su inserimento, chiamo il metodo insert dell'ObjectDataSource - odsGiust.Insert(); - } - /// - /// annulla inserimento nuovo valore da footer - /// - /// - /// - protected void lblCanc_click(object sender, EventArgs e) - { - // annullo inserimento: nascondo footer, bind controlli... - grViewGiust.FooterRow.Visible = false; - } - /// - /// inserisce un giust nuovo x dipendente/data - /// - /// - /// - protected void btNewGiust_Click(object sender, EventArgs e) - { - int idxDip = memLayer.ML.IntSessionObj("idxDip_det"); - // calcola ed inserisce giustificativi - DataProxy.DP.taGiust.giustInsByDate(idxDip, dataRif, "PERM"); - updateVisual(); - } - /// - /// aggiorna i 3 datagrid - /// - private void updateVisual() - { - // aggiorno visualizzazioni - grViewExpl.DataBind(); - mod_elencoTimbr1.doUpdate(); - grViewGiust.DataBind(); - } - /// - /// aggiornamento x update - /// - /// - /// - protected void odsGiust_Updated(object sender, ObjectDataSourceStatusEventArgs e) - { - updateVisual(); - } - /// - /// aggiornamento x delete - /// - /// - /// - protected void odsGiust_Deleted(object sender, ObjectDataSourceStatusEventArgs e) - { - updateVisual(); - } - /// - /// calcola se sia visibile con criterio GREATER THAN ZERO - /// - /// - /// - public bool isGTZ(object valore) - { - bool answ = false; - try - { - if (Convert.ToDouble(valore) > 0) - { - answ = true; - } - } - catch - { } - return answ; - } - - #endregion - - /// - /// cambia stato visibilità week-end... - /// - /// - /// - protected void chkWE_CheckedChanged(object sender, EventArgs e) - { - // imposto ods - checkFixOds(); - } - /// - /// ricalcola giornate periodo visualizzato per i dipendenti selezionati - /// - /// - /// - protected void btnRicalcPeriodo_Click(object sender, EventArgs e) - { - // eseguo la stored di update dato condizione di filtro x periodo e dipendente... - DataProxy.DP.taTimbExpl.stp_ricalcolaTimbExpl_byPeriodoUser(memLayer.ML.IntSessionObj("idxDip_sel"), Convert.ToDateTime(memLayer.ML.objSessionObj("_inizio")), Convert.ToDateTime(memLayer.ML.objSessionObj("_fine"))); - DataProxy.DP.taRA.stp_ricalcolaRegAttivitaExpl_byPeriodoUser(memLayer.ML.IntSessionObj("idxDip_sel"), Convert.ToDateTime(memLayer.ML.objSessionObj("_inizio")), Convert.ToDateTime(memLayer.ML.objSessionObj("_fine"))); - // aggiorno - checkFixOds(); - } /// /// restituisce il colore data valore ok commessa /// @@ -446,6 +404,7 @@ namespace GPW_Admin.WebUserControls { } return answ; } + /// /// restituisce il colore dato minMpp (se > 0 è verde, altrimenti marrone) /// @@ -468,16 +427,7 @@ namespace GPW_Admin.WebUserControls } return answ; } - /// - /// determina se si debba mostrare cognome nome (altrimenti IDX anonimo) - /// - public bool showCognomeNome - { - get - { - return memLayer.ML.confReadBool("reviewShowCN"); - } - } + /// /// formatta la durata in ore secondo web.config (centesimale/ore:min) /// @@ -505,9 +455,102 @@ namespace GPW_Admin.WebUserControls return answ; } - protected void odsGiust_Inserting(object sender, ObjectDataSourceMethodEventArgs e) + /// + /// inverte valore booleano + /// + /// + /// + public bool invBool(object valore) { - + bool answ = true; + try + { + answ = !Convert.ToBoolean(valore); + } + catch + { } + return answ; } + + /// + /// calcola se sia visibile con criterio GREATER THAN ZERO + /// + /// + /// + public bool isGTZ(object valore) + { + bool answ = false; + try + { + if (Convert.ToDouble(valore) > 0) + { + answ = true; + } + } + catch + { } + return answ; + } + + /// + /// resetta la selezione dei valori in caso di modifiche su altri controlli + /// + public void resetSelezione() + { + grViewExpl.SelectedIndex = -1; + grViewExpl.DataBind(); + setDetailVisib(false); + } + + /// + /// resetta la selezione dei valori in caso di modifiche su altri controlli + /// + public void resetSelezioneGiust() + { + grViewGiust.SelectedIndex = -1; + grViewGiust.DataBind(); + } + + /// + /// converte valore in booleano + /// + /// + /// + public bool toBool(object valore) + { + bool answ = true; + try + { + answ = Convert.ToBoolean(valore); + } + catch + { } + return answ; + } + + /// + /// prepara tooltip permessi/straordinarie + /// + /// + /// + /// + /// + public string tooltipPermStra(object minStra, object minPerm, object minMpp) + { + string answ = ""; + try + { + answ = string.Format("Straordinarie: {0:0.##} min, Permessi: {1:0.##} min", minStra, minPerm); + if (Convert.ToInt32(minMpp) > 0) + { + answ += string.Format(", Pranzo: {0:0.##} min", minMpp); + } + } + catch + { } + return answ; + } + + #endregion Public Methods } } \ No newline at end of file diff --git a/GPW_Admin/WebUserControls/mod_reviewTimbrature.ascx.designer.cs b/GPW_Admin/WebUserControls/mod_reviewTimbrature.ascx.designer.cs index 42e6a76..203da58 100644 --- a/GPW_Admin/WebUserControls/mod_reviewTimbrature.ascx.designer.cs +++ b/GPW_Admin/WebUserControls/mod_reviewTimbrature.ascx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace GPW_Admin.WebUserControls { - - - public partial class mod_reviewTimbrature { - +namespace GPW_Admin.WebUserControls +{ + + + public partial class mod_reviewTimbrature + { + /// /// Controllo filtroDip. /// @@ -20,7 +22,7 @@ namespace GPW_Admin.WebUserControls { /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::mod_filtro filtroDip; - + /// /// Controllo odsDip. /// @@ -29,16 +31,16 @@ namespace GPW_Admin.WebUserControls { /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.ObjectDataSource odsDip; - + /// - /// Controllo mod_periodoAnalisi1. + /// Controllo cmp_periodoAnalisi. /// /// /// Campo generato automaticamente. /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// - protected global::mod_periodoAnalisi mod_periodoAnalisi1; - + protected global::GPW_Admin.WebUserControls.cmp_periodoAnalisi cmp_periodoAnalisi; + /// /// Controllo chkWE. /// @@ -47,7 +49,7 @@ namespace GPW_Admin.WebUserControls { /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.CheckBox chkWE; - + /// /// Controllo btnRicalcPeriodo. /// @@ -56,7 +58,7 @@ namespace GPW_Admin.WebUserControls { /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.Button btnRicalcPeriodo; - + /// /// Controllo hlExport. /// @@ -65,7 +67,7 @@ namespace GPW_Admin.WebUserControls { /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.HyperLink hlExport; - + /// /// Controllo hlExportComm. /// @@ -74,7 +76,7 @@ namespace GPW_Admin.WebUserControls { /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.HyperLink hlExportComm; - + /// /// Controllo grViewExpl. /// @@ -83,7 +85,7 @@ namespace GPW_Admin.WebUserControls { /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.GridView grViewExpl; - + /// /// Controllo odsExpl. /// @@ -92,7 +94,7 @@ namespace GPW_Admin.WebUserControls { /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.ObjectDataSource odsExpl; - + /// /// Controllo pnlDettagli. /// @@ -101,7 +103,7 @@ namespace GPW_Admin.WebUserControls { /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.Panel pnlDettagli; - + /// /// Controllo mod_elencoTimbr1. /// @@ -110,7 +112,7 @@ namespace GPW_Admin.WebUserControls { /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::GPW_Admin.WebUserControls.mod_elencoTimbr mod_elencoTimbr1; - + /// /// Controllo grViewGiust. /// @@ -119,7 +121,7 @@ namespace GPW_Admin.WebUserControls { /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.GridView grViewGiust; - + /// /// Controllo odsGiust. /// @@ -128,7 +130,7 @@ namespace GPW_Admin.WebUserControls { /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.ObjectDataSource odsGiust; - + /// /// Controllo odsCodGiust. /// @@ -137,7 +139,7 @@ namespace GPW_Admin.WebUserControls { /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.ObjectDataSource odsCodGiust; - + /// /// Controllo mod_commAttivitaDesk1. /// diff --git a/GPW_Admin/reviewTimbrature.aspx b/GPW_Admin/reviewTimbrature.aspx index aab12ab..58ce0e5 100644 --- a/GPW_Admin/reviewTimbrature.aspx +++ b/GPW_Admin/reviewTimbrature.aspx @@ -1,5 +1,6 @@ -<%@ Page Title="GPW-ADM"Language="C#" MasterPageFile="~/WebMasterPages/AjaxTitle.master" AutoEventWireup="true" CodeBehind="reviewTimbrature.aspx.cs" Inherits="GPW_Admin.reviewTimbrature" %> -<%@ Register src="~/WebUserControls/mod_reviewTimbrature.ascx" tagname="mod_reviewTimbrature" tagprefix="uc1" %> +<%@ Page Title="GPW-ADM" Language="C#" MasterPageFile="~/WebMasterPages/BMP.master" AutoEventWireup="true" CodeBehind="reviewTimbrature.aspx.cs" Inherits="GPW_Admin.reviewTimbrature" %> + +<%@ Register Src="~/WebUserControls/mod_reviewTimbrature.ascx" TagName="mod_reviewTimbrature" TagPrefix="uc1" %> - + \ No newline at end of file diff --git a/GPW_Admin/reviewTimbrature.aspx.designer.cs b/GPW_Admin/reviewTimbrature.aspx.designer.cs index 5eb17e5..c1b8a0f 100644 --- a/GPW_Admin/reviewTimbrature.aspx.designer.cs +++ b/GPW_Admin/reviewTimbrature.aspx.designer.cs @@ -1,23 +1,25 @@ //------------------------------------------------------------------------------ -// -// This code was generated by a tool. +// +// Codice generato da uno strumento. // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// +// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se +// il codice viene rigenerato. +// //------------------------------------------------------------------------------ -namespace GPW_Admin { - - - public partial class reviewTimbrature { - +namespace GPW_Admin +{ + + + public partial class reviewTimbrature + { + /// - /// mod_reviewTimbrature1 control. + /// Controllo mod_reviewTimbrature1. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::GPW_Admin.WebUserControls.mod_reviewTimbrature mod_reviewTimbrature1; }